dawn-cmake/test/bug/tint/827.wgsl
Ben Clayton 3628949efc test: Add bug cases taken from monorail
Some now pass, some still fail.

If we fix bugs and they begin to pass, we have a better chance of noticing and marking the issues as fixed.

Change-Id: I7278f960967a570ccde8865dcf2aa580235559bf
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54062
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
2021-06-10 18:49:14 +00:00

16 lines
483 B
WebGPU Shading Language

[[block]] struct Result {
values : array<f32>;
};
let width : u32 = 128u;
[[group(0), binding(0)]] var tex : texture_depth_2d;
[[group(0), binding(1)]] var<storage> result : [[access(read_write)]] Result;
[[stage(compute)]] fn main(
[[builtin(global_invocation_id)]] GlobalInvocationId : vec3<u32>
) {
result.values[GlobalInvocationId.y * width + GlobalInvocationId.x] = textureLoad(
tex, vec2<i32>(i32(GlobalInvocationId.x), i32(GlobalInvocationId.y)), 0);
}