diff options
| author | Yong He <yonghe@outlook.com> | 2024-05-08 20:23:38 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-08 20:23:38 -0700 |
| commit | 756ce3d91faf80b6a3e6a695d0dec3968048c11e (patch) | |
| tree | 6e46aa958fe9fff509861888aa8c17e234eb509b /tests/spirv/image-atomic-array-2.slang | |
| parent | 708345d16a877ac164171439cf9b4ea825b78d23 (diff) | |
Fix legalization of `kIROp_GetLegalizedSPIRVGlobalParamAddr`. (#4141)
Diffstat (limited to 'tests/spirv/image-atomic-array-2.slang')
| -rw-r--r-- | tests/spirv/image-atomic-array-2.slang | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/spirv/image-atomic-array-2.slang b/tests/spirv/image-atomic-array-2.slang new file mode 100644 index 000000000..f5dc2b101 --- /dev/null +++ b/tests/spirv/image-atomic-array-2.slang @@ -0,0 +1,13 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv + +// CHECK: %{{.*}} = OpImageTexelPointer %{{.*}} %{{.*}} %{{.*}} %int_0 +// CHECK: %{{.*}} = OpAtomicIAdd %ulong %{{.*}} %uint_1 %uint_0 %ulong_0 + +[[vk::binding(0,0)]] RWTexture2D<uint64_t> tex; + +[shader("compute")] +[numthreads(1, 1, 1)] +void main() +{ + InterlockedAdd(tex[uint2(0,0)], uint64_t(0)); +}
\ No newline at end of file |
