mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-06 12:15:43 +00:00
When these are used inside a function, we were not unwrapping the array from the struct that we wrapped it in. Fixed: tint:1385 Change-Id: Ide7bbd802394bf09819265be48d978ec9346adfe Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/77180 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: James Price <jrprice@google.com>
17 lines
321 B
Plaintext
17 lines
321 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
struct tint_symbol_3 {
|
|
/* 0x0000 */ int arr[1];
|
|
};
|
|
|
|
int foo(const device int (*const tint_symbol_1)[1]) {
|
|
return (*(tint_symbol_1))[0];
|
|
}
|
|
|
|
kernel void tint_symbol(const device tint_symbol_3* tint_symbol_2 [[buffer(0)]]) {
|
|
foo(&((*(tint_symbol_2)).arr));
|
|
return;
|
|
}
|
|
|