diff options
| author | Yong He <yonghe@outlook.com> | 2024-04-03 11:46:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-03 11:46:25 -0700 |
| commit | 74d4c8ab92c1050865c421a64d9f5d3fc9a2da73 (patch) | |
| tree | c0173f5e59ca2c7f418ecd1568a26a95aab26ff6 /tests | |
| parent | e0de98e9aabbe118f0eeca7821518c8fb4e1f6c4 (diff) | |
Update glsl intrinsic for GroupMemoryBarrierWithGroupSync (#3890)
* Update glsl intrinsic for `GroupMemoryBarrierWithGroupSync`,
* Add spirv tests for `GroupMemoryBarrierWithGroupSync`.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/spirv/barrier.slang | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/spirv/barrier.slang b/tests/spirv/barrier.slang new file mode 100644 index 000000000..769bf9b7e --- /dev/null +++ b/tests/spirv/barrier.slang @@ -0,0 +1,14 @@ +//TEST:SIMPLE(filecheck=CHECK):-target spirv -emit-spirv-directly -O0 +//TEST:SIMPLE(filecheck=CHECK):-target spirv -emit-spirv-via-glsl -entry main -stage compute -O0 + +RWStructuredBuffer<float> output; + +[numthreads(1,1,1)] +[shader("compute")] +void main() +{ + output[0] = 0; + // CHECK: OpControlBarrier %uint_2 %uint_2 %uint_264 + GroupMemoryBarrierWithGroupSync(); + output[1] = 0; +}
\ No newline at end of file |
