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.slang | |
| parent | 708345d16a877ac164171439cf9b4ea825b78d23 (diff) | |
Fix legalization of `kIROp_GetLegalizedSPIRVGlobalParamAddr`. (#4141)
Diffstat (limited to 'tests/spirv/image-atomic-array.slang')
| -rw-r--r-- | tests/spirv/image-atomic-array.slang | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/spirv/image-atomic-array.slang b/tests/spirv/image-atomic-array.slang new file mode 100644 index 000000000..6cff48f6d --- /dev/null +++ b/tests/spirv/image-atomic-array.slang @@ -0,0 +1,14 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv + +import glsl; +[[vk::binding(0,0)]] RWTexture2D<uint64_t> tex[]; + +// CHECK: OpEntryPoint +// CHECK: %{{.*}} = OpImageTexelPointer %{{.*}} %{{.*}} %{{.*}} %int_0 +// CHECK: %{{.*}} = OpAtomicIAdd %ulong %{{.*}} %uint_1 %uint_0 %ulong_0 +[shader("compute")] +[numthreads(1, 1, 1)] +void main() +{ + imageAtomicAdd(tex[0], int2(0,0), uint64_t(0)); +}
\ No newline at end of file |
