Skip to content

Commit

Permalink
test that an override-sized array with same resolved size as another …
Browse files Browse the repository at this point in the history
…override-sized array works
  • Loading branch information
kentslaney authored and teoxoy committed Dec 19, 2024
1 parent 0524a34 commit 998667d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/tests/shader/array_size_overrides.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ const SHADER: &str = r#"
@group(0) @binding(0)
var<storage, read_write> output: array<u32>;
// When `n` is overridden to 14 above, it will generate the type `array<u32, 14 - 2>` which
// already exists in the program because of variable declaration. Ensures naga does not panic
// when this happens.
//
// See https://github.com/gfx-rs/wgpu/issues/6722 for more info.
var<workgroup> testing: array<u32, 12>;
@compute @workgroup_size(1) fn main() {
// 1d spiral
for (var i = 0; i < n - 2; i++) {
Expand Down

0 comments on commit 998667d

Please sign in to comment.