dawn-cmake/test/bug/tint/870.spvasm.expected.hlsl
Ben Clayton 883fb63e01 transform: Don't unroll arrays in DecomposeMemoryAccess
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>
2021-07-16 19:47:44 +00:00

30 lines
680 B
HLSL

ByteAddressBuffer sspp962805860buildInformation : register(t2, space0);
typedef int tint_symbol_ret[6];
tint_symbol_ret tint_symbol(ByteAddressBuffer buffer, uint offset) {
int arr[6] = (int[6])0;
{
for(uint i = 0u; (i < 6u); i = (i + 1u)) {
arr[i] = asint(buffer.Load((offset + (i * 4u))));
}
}
return arr;
}
void main_1() {
int orientation[6] = (int[6])0;
const int x_23[6] = tint_symbol(sspp962805860buildInformation, 36u);
orientation[0] = x_23[0u];
orientation[1] = x_23[1u];
orientation[2] = x_23[2u];
orientation[3] = x_23[3u];
orientation[4] = x_23[4u];
orientation[5] = x_23[5u];
return;
}
void main() {
main_1();
return;
}