Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non 32 bit integers (8, 16, 64) #4424

Open
averyanalex opened this issue Dec 27, 2022 · 3 comments
Open

Support non 32 bit integers (8, 16, 64) #4424

averyanalex opened this issue Dec 27, 2022 · 3 comments
Labels
naga Shader Translator type: enhancement New feature or request

Comments

@averyanalex
Copy link

averyanalex commented Dec 27, 2022

I tried to load SPIRV compute shader compiled by rust-gpu with u64 integers and got validation error:

thread 'main' panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_shader_module
      note: label = `REDACTED/target/spirv-builder/spirv-unknown-vulkan1.1/release/deps/shader.spv`

Shader validation error:
  ┌─ REDACTED/target/spirv-builder/spirv-unknown-vulkan1.1/release/deps/shader.spv:1:1
  │
1 │
  │   naga::Constant [6]


    Constant [6] '' is invalid
    The type doesn't match the constant

', REDACTED/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/wgpu-0.14.2/src/backend/direct.rs:2403:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Adding wgpu::Features::SHADER_FLOAT64 to features didn't help.

@teoxoy
Copy link
Member

teoxoy commented Jan 5, 2023

We don't currently support non 32 bit integers.
SHADER_FLOAT64 enables only 64 bit floats.

@teoxoy teoxoy changed the title Shader validation error: Constant [6] '' is invalid Support non 32 bit integers (8, 16, 64) Jan 5, 2023
@cwfitzgerald cwfitzgerald added the naga Shader Translator label Oct 25, 2023
@cwfitzgerald cwfitzgerald transferred this issue from gfx-rs/naga Oct 25, 2023
@JMS55
Copy link
Contributor

JMS55 commented Jan 7, 2024

Would love both u64 support in shaders, as well as R64Uint textures.

@atlv24 atlv24 mentioned this issue Mar 13, 2024
6 tasks
@atlv24 atlv24 mentioned this issue Apr 15, 2024
6 tasks
@teoxoy teoxoy added type: enhancement New feature or request and removed kind: feature labels Jul 3, 2024
@tombh
Copy link

tombh commented Sep 30, 2024

I think u8 support is needed to allow rust-gpu's enums to work? I can compile Rust's dataless enums into SPIR-V without issue, I just need to add the Int8 capability to the rust-gpu compiler. But then when I try to load the shader into wgpu, I get: Shader '' parsing error: InvalidTypeWidth(1). Does that seem right?

Is there an issue to track for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
naga Shader Translator type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants