-
Notifications
You must be signed in to change notification settings - Fork 677
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPIRV] Fix NonSemanticDebugInfo to include all files (#6935)
Previously, we fixed the SPIRV OpenCL debug info to always represent all include files, even those that only have preprocessor definitions. This work was merged in #6094. This PR applies the same fix to the NonSemantic debug info, and resolves #6907
- Loading branch information
1 parent
c0c01e9
commit 5c16ae7
Showing
5 changed files
with
43 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
tools/clang/test/CodeGenSPIRV/shader.debug.opsource.include.hlsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// RUN: %dxc -T ps_6_0 -E main -Zi %s -spirv -fspv-debug=vulkan-with-source | FileCheck %s | ||
|
||
// CHECK: [[main:%[0-9]+]] = OpString | ||
// CHECK-SAME: shader.debug.opsource.include.hlsl | ||
// CHECK: [[file1:%[0-9]+]] = OpString | ||
// CHECK-SAME: spirv.debug.opsource.include-file.hlsli | ||
// CHECK: [[file1string:%[0-9]+]] = OpString "#define UBER_TYPE(x) x ## Type | ||
// CHECK: [[mainstring:%[0-9]+]] = OpString "// RUN: %dxc -T ps_6_0 -E main -Zi %s -spirv -fspv-debug=vulkan-with-source | FileCheck %s | ||
|
||
// CHECK: DebugSource [[file1]] [[file1string]] | ||
// CHECK: DebugSource [[main]] [[mainstring]] | ||
|
||
#include "spirv.debug.opsource.include-file.hlsli" | ||
|
||
struct ColorType | ||
{ | ||
float4 position : SV_POSITION; | ||
float4 color : COLOR; | ||
}; | ||
|
||
float4 main(UBER_TYPE(Color) input) : SV_TARGET | ||
{ | ||
return input.color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters