dawn-cmake/test/tint/bug/tint/1474-b.wgsl.expected.wgsl
Ben Clayton 9535f72209 tint/validator: Hint 'var' instead of 'const'
Involves expanding the source range of a variable declaration so we can point at something that can include the 'const'.

Fixed: tint:1740
Change-Id: Ie8f784de34a1792002aaa708c1b77053be54f1b5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108120
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-11-02 18:14:59 +00:00

15 lines
367 B
WebGPU Shading Language

bug/tint/1474-b.wgsl:7:5 warning: code is unreachable
let non_uniform_cond = non_uniform_value == 0;
^^^^^^^^^^^^^^^^^^^^
@group(0) @binding(0) var<storage, read_write> non_uniform_value : i32;
@compute @workgroup_size(1, 1, 1)
fn main() {
return;
let non_uniform_cond = (non_uniform_value == 0);
if (non_uniform_cond) {
workgroupBarrier();
}
}