mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-05 06:03:34 +00:00
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>
16 lines
483 B
WebGPU Shading Language
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);
|
|
}
|