diff options
| author | Yong He <yonghe@outlook.com> | 2024-10-16 09:54:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-16 09:54:43 -0700 |
| commit | 2ee898109006986250d5356a59003eb741a89ca4 (patch) | |
| tree | d1c6f9c4cc7b17878c8bba53f6f89754e0a713e1 /tests/spirv/debug-type-pointer-2.slang | |
| parent | 9e32b006318814e688501c4b547308d7fb472e78 (diff) | |
Fix spirv debug info for pointer types. (#5319)
* Fix spirv debug info for pointer types.
* fix comment.
Diffstat (limited to 'tests/spirv/debug-type-pointer-2.slang')
| -rw-r--r-- | tests/spirv/debug-type-pointer-2.slang | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/spirv/debug-type-pointer-2.slang b/tests/spirv/debug-type-pointer-2.slang new file mode 100644 index 000000000..4112d4905 --- /dev/null +++ b/tests/spirv/debug-type-pointer-2.slang @@ -0,0 +1,24 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv + +// Check that we do not emit forward reference for debug pointer types if there isn't a need to do so. + +// CHECK-NOT: OpExtension "SPV_KHR_relaxed_extended_instruction" +struct T +{ + uint inner; +} + +struct Problem +{ + int getVal() { return some_bda_ptr->inner;} + T *some_bda_ptr; +} + +uniform Problem probs; + +RWStructuredBuffer<float4> outputBuffer; +[shader("compute")] +float4 main() +{ + outputBuffer[0] = float(probs.getVal()); +}
\ No newline at end of file |
