Closed sagudev closed 1 month ago
This happens on both compute/render pipeline.
Duplicate of
I tested repro with https://github.com/gfx-rs/wgpu/pull/6280 and while it does not panic it still raises validation error (per CTS it should return appropriate bind group), so please reopen the issue.
The problem is that usage = 0
:
https://github.com/gfx-rs/wgpu/blob/9f85f8aeea6c43c1a412bafc8fbcfb43aad0dd20/wgpu-core/src/validation.rs#L897-L900
for compute pipeline with:
@group(0) @binding(0) var<uniform> binding: f32;
@compute @workgroup_size(1) fn main(
@builtin(global_invocation_id) id: vec3<u32>
) {
_ = binding;
}
More specifically the problem is that naga eliminates phony assigement, converting wgsl from above to wgsl returns:
@group(0) @binding(0)
var<uniform> binding: f32;
@compute @workgroup_size(1, 1, 1)
fn main(@builtin(global_invocation_id) id: vec3<u32>) {
}
this is regression naga-cli v0.12.3->
naga-cli v0.13.0
I think it's https://github.com/gfx-rs/naga/pull/2378, but also we remove expressions on compacting ...
Description When layout is not explicitly provided when creating pipeline,
get_bind_group_layout
fails withError reflecting bind group 0: Invalid group index 0
, but explicitly providing it makes it work.Repro steps Relevant CTS test that fails in firefox (and servo): webgpu:api,validation,getBindGroupLayout:index_range,auto_layout:*
I also extracted relevant failing CTS subtest in rust/wgpu repro: https://github.com/sagudev/wgpu-problem/tree/get-auto-bind-group-layout (also contains explicit code that makes it work using
explicit
feature).Platform Happens on current trunk.