diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2025-07-11 13:47:33 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-11 20:47:33 +0000 |
| commit | 1dc32b8bf8dd14e607d306c160b1bedf46067910 (patch) | |
| tree | a38800f7b0cf65c0bdcb554c4031d2617478d676 /tests | |
| parent | e3afef145e67e74e054407606320be0e42a6aa63 (diff) | |
Add DebugGlobalVariable instructions to SPIR-V output (#7686)
* Add DebugGlobalVariable instructions to SPIR-V output
Implements generation of DebugGlobalVariable instructions for global variables
like Texture2D and SamplerState in SPIR-V debug information output. Adds debug
type support for texture and sampler types using DebugTypeComposite.
* Handle two more types for DebugGlobalVariable
kIROp_RaytracingAccelerationStructureType and
kIROp_SamplerComparisonStateType had to be handled in
`emitDebugTypeImpl()`
* Fix format
* Refactor debug type emission to reduce duplication
Use IRSamplerStateTypeBase type check and fallback pattern instead of
separate cases for each opcode type.
* Fix compiler warning
* Simplify `emitDebugTypeImpl()` more
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/spirv/debug-variable-scope.slang (renamed from tests/spirv/debug-local-variable-scope.slang) | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/spirv/debug-local-variable-scope.slang b/tests/spirv/debug-variable-scope.slang index 22f6aef2e..946c1a08b 100644 --- a/tests/spirv/debug-local-variable-scope.slang +++ b/tests/spirv/debug-variable-scope.slang @@ -1,4 +1,4 @@ -//TEST:SIMPLE(filecheck=CHECK):-target spirv -entry main -stage fragment -g2 -emit-spirv-directly +//TEST:SIMPLE(filecheck=CHECK):-target spirv-asm -entry main -stage fragment -g2 -emit-spirv-directly Texture2D testTex : register(t0); SamplerState testSampler : register(s0); @@ -17,5 +17,7 @@ float4 main(PSIn input) : SV_TARGET return float4(colVal.xyz, 1.0); } +// CHECK: %[[COMPILATION_UNIT_ID:[0-9]+]] = OpExtInst %void {{.*}} DebugCompilationUnit // CHECK: %[[FUNC_ID:[0-9]+]] = OpExtInst %void {{.*}} DebugFunction %{{[0-9]+}} // CHECK: DebugLocalVariable %{{[0-9]+}} %{{[0-9]+}} %{{[0-9]+}} %{{.*}} %{{.*}} %[[FUNC_ID]] +// CHECK: DebugGlobalVariable %{{[0-9]+}} %{{[0-9]+}} %{{[0-9]+}} %{{.*}} %{{.*}} %[[COMPILATION_UNIT_ID]] |
