dawn-cmake/test/bug/tint/870.spvasm.expected.hlsl
Ben Clayton d47eb3a965 writer/hlsl: Generate padding for UBO padded structs
Combined with the new PadArrayElements transform, arrays with strides
are now correctly emitted.

Fixed: tint:182
Fixed: tint:895
Change-Id: I26a1be94dee6e4c9d9747c8317a932fc1fb3c810
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54640
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-06-16 09:50:11 +00:00

23 lines
883 B
HLSL

struct tint_array_wrapper {
/* 0x0000 */ int arr[6];
};
tint_array_wrapper tint_symbol_1(ByteAddressBuffer buffer, uint offset) {
const tint_array_wrapper tint_symbol_2 = {{asint(buffer.Load((offset + 0u))), asint(buffer.Load((offset + 4u))), asint(buffer.Load((offset + 8u))), asint(buffer.Load((offset + 12u))), asint(buffer.Load((offset + 16u))), asint(buffer.Load((offset + 20u)))}};
return tint_symbol_2;
}
ByteAddressBuffer sspp962805860buildInformation : register(t2, space0);
void main() {
tint_array_wrapper orientation = {{0, 0, 0, 0, 0, 0}};
const tint_array_wrapper x_23 = tint_symbol_1(sspp962805860buildInformation, 36u);
orientation.arr[0] = x_23.arr[0u];
orientation.arr[1] = x_23.arr[1u];
orientation.arr[2] = x_23.arr[2u];
orientation.arr[3] = x_23.arr[3u];
orientation.arr[4] = x_23.arr[4u];
orientation.arr[5] = x_23.arr[5u];
return;
}