mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-03 10:45:36 +00:00
Arrays can be extremely large, and having the load and store functions unroll the elements can make the complier explode. Fixed: chromium:1229233 Change-Id: Ieb5654254e16f5ce724a205d21d954ef9a0cd053 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58382 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@chromium.org> Reviewed-by: David Neto <dneto@google.com> Auto-Submit: Ben Clayton <bclayton@google.com>
18 lines
259 B
HLSL
18 lines
259 B
HLSL
cbuffer cbuffer_constants : register(b0, space1) {
|
|
uint4 constants[1];
|
|
};
|
|
|
|
RWByteAddressBuffer result : register(u1, space1);
|
|
|
|
struct S {
|
|
uint data[3];
|
|
};
|
|
|
|
static S s = (S)0;
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void main() {
|
|
s.data[constants[0].x] = 0u;
|
|
return;
|
|
}
|