[Migrated] spirv-tools: Assertion `env != SPV_ENV_WEBGPU_0' failed.(my bug report)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.4k
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/1141
Old labels: t: bug
Originally creatd by sirati on 2024-04-05T23:00:44Z
rustc: spirv-tools/source/opt/optimizer.cpp:66: spvtools::Optimizer::Optimizer(spv_target_env): Assertion `env != SPV_ENV_WEBGPU_0' failed.
Expected Behaviour
properly compiling
Example & Steps To Reproduce
researching this. so far i have nothing but stub methods in my project and this still triggers. dont know if this is a portable bug yet.
System Info
- Rust:
rustc 1.71.0-nightly (1a5f8bce7 2023-05-26) - OS: PopOS
- GPU: Intel(R) UHD Graphics 630
- SPIR-V: apparently not installed, but it cann still run spirv-tools code?!?!??! Installing did not help
Backtrace
Backtrace
/home/sirati/.cargo/bin/cargo check --message-format json --workspace --all-targets -Z unstable-options --keep-going
Checking ahash v0.8.11
Checking hashbrown v0.14.3
Checking indexmap v2.2.6
Checking gpu-descriptor v0.2.4
Checking naga v0.19.2
Checking civ3-renderer-shaders v0.1.0 (/home/sirati/RustroverProjects/Civ3Renderer/shaders)
Compiling Civ3Renderer v0.1.0 (/home/sirati/RustroverProjects/Civ3Renderer)
Checking wgpu-hal v0.19.3
Checking wgpu-core v0.19.3
Checking wgpu v0.19.3
error: failed to run custom build command for `Civ3Renderer v0.1.0 (/home/sirati/RustroverProjects/Civ3Renderer)`
error: failed to run custom build command for `Civ3Renderer v0.1.0 (/home/sirati/RustroverProjects/Civ3Renderer)`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
process didn't exit successfully: `/home/sirati/RustroverProjects/Civ3Renderer/target/debug/build/Civ3Renderer-da0432a522988ca8/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=RUSTGPU_CODEGEN_ARGS
cargo:rerun-if-env-changed=RUSTGPU_RUSTFLAGS
--- stderr
Compiling civ3-renderer-shaders v0.1.0 (/home/sirati/RustroverProjects/Civ3Renderer/shaders)
rustc: spirv-tools/source/opt/optimizer.cpp:66: spvtools::Optimizer::Optimizer(spv_target_env): Assertion `env != SPV_ENV_WEBGPU_0' failed.
error: could not compile `civ3-renderer-shaders` (lib)
Error: BuildFailed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reported cargo check command in the Civ3Renderer example and confirm whether the failure is reproducible with the listed Rust and PopOS environment. Trace the shader build through the custom build command to the assertion in spirv-tools/source/opt/optimizer.cpp. Done means identifying a portable cause and restoring compilation, with a focused reproduction or test if the project supports one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100