Skip to content

Sampler buffer of group SamplerIndexBufferKey { group: 0 } not bound to a register for unused and unbound sampler buffer on DX12 #7638

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

Open
ErichDonGubler opened this issue Apr 25, 2025 · 3 comments
Assignees
Labels
area: correctness We're behaving incorrectly area: ecosystem Help the connected projects grow and prosper area: naga back-end Outputs of naga shader conversion backend: dx12 Issues with DX12 or DXGI

Comments

@ErichDonGubler
Copy link
Member

When I run the trace contained in wgpu-trace-crashy-on-doze.zip against WGPU on the DX12 backend on Windows, recorded from running https://webgpu.github.io/webgpu-samples/?sample=bitonicSort in Firefox:

RUST_BACKTRACE=1 cargo run -p player -- ~/Downloads/wgpu-trace-crashy-on-doze/0/
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.00s
     Running `target\debug\play.exe C:\Users\Erich\Downloads/wgpu-trace-crashy-on-doze/0\`
thread 'main' panicked at E:\wgpu\naga\src\back\hlsl\help.rs:1690:17:
internal error: entered unreachable code: Sampler buffer of group SamplerIndexBufferKey { group: 0 } not bound to a register
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58\library/std\src\panicking.rs:665
   1: core::panicking::panic_fmt
             at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58\library/core\src\panicking.rs:76
   2: naga::back::hlsl::Writer<ref_mut$<alloc::string::String> >::write_wrapped_sampler_buffer<ref_mut$<alloc::string::String> >
             at .\naga\src\back\hlsl\help.rs:1690
   3: naga::back::hlsl::Writer<ref_mut$<alloc::string::String> >::write_global_sampler<ref_mut$<alloc::string::String> >
             at .\naga\src\back\hlsl\writer.rs:1060
   4: naga::back::hlsl::Writer<ref_mut$<alloc::string::String> >::write_global<ref_mut$<alloc::string::String> >
             at .\naga\src\back\hlsl\writer.rs:901
   5: naga::back::hlsl::Writer<ref_mut$<alloc::string::String> >::write<ref_mut$<alloc::string::String> >
             at .\naga\src\back\hlsl\writer.rs:382
   6: wgpu_hal::dx12::Device::load_shader
             at .\wgpu-hal\src\dx12\device.rs:307
   7: wgpu_hal::dx12::device::impl$1::create_render_pipeline
             at .\wgpu-hal\src\dx12\device.rs:1669
   8: wgpu_hal::dynamic::device::impl$0::create_render_pipeline<wgpu_hal::dx12::Device>
             at .\wgpu-hal\src\dynamic\device.rs:402
   9: wgpu_core::device::resource::Device::create_render_pipeline
             at .\wgpu-core\src\device\resource.rs:3632
  10: wgpu_core::global::Global::device_create_render_pipeline
             at .\wgpu-core\src\device\global.rs:1319
  11: player::impl$0::process
             at .\player\src\lib.rs:375
  12: play::main
             at .\player\src\bin\play.rs:105
  <snip>

This does not happen on macOS for me (N.B., adjusting backend: Dx12 in trace.ron), so this seems like a backend-specific problem.

@ErichDonGubler ErichDonGubler added area: correctness We're behaving incorrectly area: ecosystem Help the connected projects grow and prosper area: naga back-end Outputs of naga shader conversion backend: dx12 Issues with DX12 or DXGI labels Apr 25, 2025
@ErichDonGubler
Copy link
Member Author

@cwfitzgerald: Might this have been regressed from #6766?

@ErichDonGubler ErichDonGubler self-assigned this Apr 28, 2025
@cwfitzgerald
Copy link
Member

Yes, this is specific to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: correctness We're behaving incorrectly area: ecosystem Help the connected projects grow and prosper area: naga back-end Outputs of naga shader conversion backend: dx12 Issues with DX12 or DXGI
Projects
Status: Todo
Development

No branches or pull requests

2 participants