mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-16 01:56:09 +00:00
And fix issues where global variables would not be emitted unless they were transitively referenced by an entry point. This change requires crbug.com/tint/697 to be fixed before landing. Change-Id: I712bd9d369e08c9a3cdfb0f114c3609584f91f28 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54241 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: James Price <jrprice@google.com>
19 lines
763 B
HLSL
19 lines
763 B
HLSL
bug/tint/827.wgsl:8:26 warning: use of deprecated language feature: declare access with var<storage, read_write> instead of using [[access]] decoration
|
|
[[group(0), binding(1)]] var<storage> result : [[access(read_write)]] Result;
|
|
^^^
|
|
|
|
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;
|
|
}
|