[Migrated] Reassigning to f64s doesn't work
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Rust
- Sterne
- 3.4k
- Forks
- 126
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem Compute-Beispiel und reproduziere die Neuzuweisung und das Lesen von f64 anhand der Zeilen im Issue. Verfolge anschließend die resultierende Compiler-Ausgabe und die SPIR-V-Validierungsfehler und überprüfe dann, dass das Beispiel ohne die Float64- und Missing-Entry-Point-Fehler kompiliert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- compilers, computer-graphics
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100