From b507d881ca47135bfa46237767e7183f61e7d8e3 Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 15 Dec 2023 17:05:32 -0800 Subject: Add ConstBufferPointer::subscript. (#3415) Co-authored-by: Yong He --- tests/hlsl-intrinsic/const-buffer-pointer.slang | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') 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); } } -- cgit v1.2.3