mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-13 19:01:24 +00:00
Fixes issues with using arrays as function return types. Fixed: tint:848 Change-Id: Iee8af0f2cea9d19e448176446c6599be2bd32316 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54321 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: James Price <jrprice@google.com>
27 lines
553 B
HLSL
27 lines
553 B
HLSL
[numthreads(1, 1, 1)]
|
|
void unused_entry_point() {
|
|
return;
|
|
}
|
|
|
|
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() {
|
|
const tint_array_wrapper src = {{0, 0, 0, 0}};
|
|
tint_array_wrapper tint_symbol = {{0, 0, 0, 0}};
|
|
S dst_struct = {{{0, 0, 0, 0}}};
|
|
tint_array_wrapper_1 dst_array = {{{{0, 0, 0, 0}}, {{0, 0, 0, 0}}}};
|
|
dst_struct.arr = src;
|
|
dst_array.arr[1] = src;
|
|
tint_symbol = src;
|
|
dst_struct.arr = src;
|
|
dst_array.arr[0] = src;
|
|
}
|