dawn-cmake/test/array/assign_to_subexpr.wgsl.expected.msl
James Price 567f2e4f3b transform/msl: Run InlinePointerLets and Simplify
This will be relied on by the upcoming arrayLength transform.

Update test expectations.

Change-Id: Ib74b647abcd6f4393f9899ce40bbf06f6e53e7f4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55180
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-06-18 09:47:23 +00:00

26 lines
460 B
Plaintext

#include <metal_stdlib>
using namespace metal;
struct tint_array_wrapper {
int arr[4];
};
struct S {
tint_array_wrapper arr;
};
struct tint_array_wrapper_1 {
tint_array_wrapper arr[2];
};
void foo() {
tint_array_wrapper const src = {.arr={}};
tint_array_wrapper dst = {};
S dst_struct = {};
tint_array_wrapper_1 dst_array = {};
dst_struct.arr = src;
dst_array.arr[1] = src;
dst = src;
dst_struct.arr = src;
dst_array.arr[0] = src;
}