diff options
| author | Yong He <yonghe@outlook.com> | 2024-03-01 12:42:37 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-01 12:42:37 -0800 |
| commit | 0d01b3701aae582b5fe3b6e2c2c718bec568c741 (patch) | |
| tree | 5525bec1a786ace62263b68b89d287105c590df6 /tests | |
| parent | 3ade07303783605ddef8c0f0c5237952c903798d (diff) | |
Various SPIRV fixes. (#3655)
* Various SPIRV fixes.
* Fix debugValue.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/spirv/debug-value-dynamic-index.slang | 29 |
1 files changed, 29 insertions, 0 deletions
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<float> memberC; + float getValue() + { + return memberA; + } +} +RWStructuredBuffer<float> 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 |
