mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-20 05:23:34 +00:00
Enables the 'chromium_experimental_full_ptr_parameters' extension to allow passing of uniform, storage and workgroup address-spaced pointers as parameters, as well as pointers into sub-objects. Bug: tint:1758 Change-Id: I8c85e6104ef4f2b9a177dec2857b1bf7f5148212 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103860 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Ben Clayton <bclayton@google.com> Reviewed-by: James Price <jrprice@google.com>
22 lines
528 B
Plaintext
22 lines
528 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
int func(threadgroup int* const pointer) {
|
|
return *(pointer);
|
|
}
|
|
|
|
void tint_symbol_inner(uint local_invocation_index, threadgroup int* const tint_symbol_1) {
|
|
{
|
|
*(tint_symbol_1) = 0;
|
|
}
|
|
threadgroup_barrier(mem_flags::mem_threadgroup);
|
|
int const r = func(tint_symbol_1);
|
|
}
|
|
|
|
kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
|
threadgroup int tint_symbol_2;
|
|
tint_symbol_inner(local_invocation_index, &(tint_symbol_2));
|
|
return;
|
|
}
|
|
|