dawn-cmake/test/ptr_ref/store/param/ptr.spvasm.expected.msl
James Price e5fdd58352 writer/msl: Emit const on array and ptr parameters
This fixes issues with passing constant arrays to functions.

Change-Id: I6e2f1c3f64df836c0b6a55ab925cf3c2bc317733
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51861
Auto-Submit: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-05-22 12:40:04 +00:00

16 lines
217 B
Plaintext

#include <metal_stdlib>
using namespace metal;
void func(int value, thread int* const pointer) {
*(pointer) = value;
return;
}
kernel void tint_symbol() {
int i = 0;
i = 123;
func(123, &(i));
return;
}