mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-08 22:26:06 +00:00
These have been deprecated, and their usages in Dawn, CTS and samples have been updated. Fixed: tint:846 Change-Id: I74b831fd5be2e7ca02e8208835eac8beddcef9af Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54325 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com> Reviewed-by: James Price <jrprice@google.com>
16 lines
472 B
WebGPU Shading Language
16 lines
472 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, read_write> result : 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);
|
|
}
|