dawn-cmake/test/tint/ptr_ref/load/param/workgroup/i32.wgsl.expected.dxc.hlsl
Ben Clayton 6992f51ebd tint: Add DirectVariableAccess transform
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>
2022-12-01 18:49:09 +00:00

24 lines
379 B
HLSL

groupshared int S;
int func_S() {
return S;
}
struct tint_symbol_1 {
uint local_invocation_index : SV_GroupIndex;
};
void main_inner(uint local_invocation_index) {
{
S = 0;
}
GroupMemoryBarrierWithGroupSync();
const int r = func_S();
}
[numthreads(1, 1, 1)]
void main(tint_symbol_1 tint_symbol) {
main_inner(tint_symbol.local_invocation_index);
return;
}