From 0d01b3701aae582b5fe3b6e2c2c718bec568c741 Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 1 Mar 2024 12:42:37 -0800 Subject: Various SPIRV fixes. (#3655) * Various SPIRV fixes. * Fix debugValue. --- tests/spirv/debug-value-dynamic-index.slang | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/spirv/debug-value-dynamic-index.slang (limited to 'tests') diff --git a/tests/spirv/debug-value-dynamic-index.slang b/tests/spirv/debug-value-dynamic-index.slang new file mode 100644 index 000000000..591b1f6da --- /dev/null +++ b/tests/spirv/debug-value-dynamic-index.slang @@ -0,0 +1,29 @@ +//TEST:SIMPLE(filecheck=CHECK):-target spirv -entry main -stage compute -g2 -emit-spirv-directly + +struct TestType +{ + float memberA; + float3 memberB; + float arrayVal[10]; + RWStructuredBuffer memberC; + float getValue() + { + return memberA; + } +} +RWStructuredBuffer result; +void main(int id : SV_DispatchThreadID) +{ + TestType t; + t.memberA = 1.0; + t.arrayVal[id] = 2; + result[0] = t.arrayVal[id]; +} + +// CHECK: OpExtInst %void {{.*}} DebugExpression +// CHECK: DebugTypeMember +// CHECK: DebugTypeComposite +// CHECK: DebugFunctionDefinition +// CHECK: DebugScope +// CHECK: DebugLine +// CHECK: DebugValue -- cgit v1.2.3