diff options
| author | Yong He <yonghe@outlook.com> | 2023-12-15 17:05:32 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-15 17:05:32 -0800 |
| commit | b507d881ca47135bfa46237767e7183f61e7d8e3 (patch) | |
| tree | 3bbe4652a6972d940fd4df92a113b760c3a9e115 /tests | |
| parent | f8b3027d0be0b890152a6a649822741cd3a3b6b6 (diff) | |
Add ConstBufferPointer::subscript. (#3415)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/hlsl-intrinsic/const-buffer-pointer.slang | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/hlsl-intrinsic/const-buffer-pointer.slang b/tests/hlsl-intrinsic/const-buffer-pointer.slang index ec242fa07..060871307 100644 --- a/tests/hlsl-intrinsic/const-buffer-pointer.slang +++ b/tests/hlsl-intrinsic/const-buffer-pointer.slang @@ -5,6 +5,10 @@ // SPV: OpEntryPoint GLCompute {{.*}} "main" {{.*}} // SPV: OpTypePointer PhysicalStorageBuffer // SPV: OpINotEqual +// SPV: OpConvertPtrToU +// SPV: OpIAdd +// SPV: OpConvertUToPtr +// SPV: OpLoad struct MyStruct { float4 position; @@ -40,5 +44,7 @@ void main(int3 tid: SV_DispatchThreadID) { MyStruct s = gGlobals.pStruct.get(); outputBuffer[tid.x] = uint(s.position.x); + MyStruct s1 = gGlobals.pStruct[3]; + outputBuffer[tid.x + 1] = uint(s1.position.x); } } |
