forked from KhronosGroup/SPIRV-Tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OPT] Update DebugDeclare if the var is not an OpVariable
When inlining, DXC can pass the result of an OpAccessChain as a parameter. Even if this is not valid SPIR-V, HLSL allows this for the `this` pointer in member function. Part of legalizing is to inline these functions. When this happens, the `var` operand on a debug declare for the parameter will be replaced by the result of the OpAccessChain. This in invalid. The debug declare needs the variable with the indexes. This commit add a pass over each function after inlining that will fix up the debug declares that are invalid in this way. Fixes microsoft/DirectXShaderCompiler#5191
- Loading branch information
Showing
4 changed files
with
83 additions
and
1 deletion.
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
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