summaryrefslogtreecommitdiffstats
path: root/tests/spirv/ptr-subscript.slang
blob: 0b30fe98e36fa96ee7c88b941a4ec6ee2ae2cc52 (plain)
1
2
3
4
5
6
7
8
9
10
11
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;
}