Reassigning to a variable should work, just as it does with f32s.
Example & Steps To Reproduce
Run the compute example (just used as it's already set up).
Then, add the following lines to the shader code:
let mut test: f64 = 1.0;
test = 2.0;
You have to remove the #[deny(warnings)] at the top.
The shader will fail to compile. This also applies to when the value is read.
System Info
Rust: nightly-2022-01-13
OS: Arch Linux
GPU: Nvidia 1060
SPIR-V: no clue, but using latest commit from this repo to build
Compiler error
```rust
error: f64 without OpCapability Float64
--> /home/icelk/.rustup/toolchains/nightly-2022-01-13-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/f64.rs:451:5
|
451 | pub(crate) const fn abs_private(self) -> f64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: Stack:
main_cs
error: No OpEntryPoint instruction was found. This is only allowed if the Linkage capability is being used.
|
= note: module `/home/icelk/dev/Rust/fractal-renderer/target/spirv-unknown-vulkan1.1/release/deps/compute_shader.spv.dir/module`
warning: an unknown error occurred
|
= note: spirv-opt failed, leaving as unoptimized
= note: module `/home/icelk/dev/Rust/fractal-renderer/target/spirv-unknown-vulkan1.1/release/deps/compute_shader.spv.dir/module`
error: error:0:0 - No OpEntryPoint instruction was found. This is only allowed if the Linkage capability is being used.
|
= note: spirv-val failed
= note: module `/home/icelk/dev/Rust/fractal-renderer/target/spirv-unknown-vulkan1.1/release/deps/compute_shader.spv.dir/module`
warning: `compute-shader` (lib) generated 1 warning
error: could not compile `compute-shader` due to 3 previous errors; 1 warning emitted
```
Expected Behaviour
Reassigning to a variable should work, just as it does with f32s.
Example & Steps To Reproduce
Run the compute example (just used as it's already set up). Then, add the following lines to the shader code:
You have to remove the
#[deny(warnings)]
at the top.The shader will fail to compile. This also applies to when the value is read.
System Info
Compiler error