[Migrated] Reassigning to f64s doesn't work
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 3.4k
- Fork
- 126
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/850
Old labels: t: bug,s: needs update
Originally creatd by Icelk on 2022-02-10T20:34:17Z
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:
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
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con l’esempio di compute e riproduci la riassegnazione e la lettura di f64 usando le righe nell’issue. Traccia quindi l’output risultante del compilatore e gli errori di validazione SPIR-V, poi verifica che l’esempio venga compilato senza gli errori Float64 e di entry point mancante.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- compilers, computer-graphics
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100