dawn-cmake/test/bug/tint/827.wgsl.expected.hlsl
Ben Clayton 7e00263c01 wgsl: Remove [[access]] and [[offset]] decorations
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>
2021-06-16 09:19:36 +00:00

15 lines
503 B
HLSL

static const uint width = 128u;
Texture2D tex : register(t0, space0);
RWByteAddressBuffer result : register(u1, space0);
struct tint_symbol_1 {
uint3 GlobalInvocationId : SV_DispatchThreadID;
};
[numthreads(1, 1, 1)]
void main(tint_symbol_1 tint_symbol) {
const uint3 GlobalInvocationId = tint_symbol.GlobalInvocationId;
result.Store((4u * ((GlobalInvocationId.y * width) + GlobalInvocationId.x)), asuint(tex.Load(int3(int(GlobalInvocationId.x), int(GlobalInvocationId.y), 0), 0)));
return;
}