diff options
Diffstat (limited to 'tests/spirv/ptr-subscript.slang')
| -rw-r--r-- | tests/spirv/ptr-subscript.slang | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/spirv/ptr-subscript.slang b/tests/spirv/ptr-subscript.slang new file mode 100644 index 000000000..0b30fe98e --- /dev/null +++ b/tests/spirv/ptr-subscript.slang @@ -0,0 +1,12 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv -entry main -stage compute -emit-spirv-directly + +// CHECK: OpEntryPoint + +ConstantBuffer<Ptr<int>> cbPtr; +void main(int id : SV_DispatchThreadID) +{ + // Check that the index operand is translated directly into a 64bit integer + // in th resulting SPIR-V without any truncations. + // CHECK: OpPtrAccessChain %_ptr_PhysicalStorageBuffer_int %{{.*}} %long_123 + cbPtr[123ll] = 4; +} |
