-
Notifications
You must be signed in to change notification settings - Fork 713
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPIRV] Simplify looking for input storage class (#6968)
The function `DeclResultIdMapper::isInputStorageClass` tries to determine the storage class for the stage variable by looking at its SigPoint. This does not always work. This change simply looks at the storage class that is already associated with the variable, which should have been set when the StageVar was created. Fixes #6959
- Loading branch information
Showing
2 changed files
with
17 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// RUN: %dxc -spirv -enable-16bit-types -T lib_6_7 -HV 202x %s | FileCheck %s | ||
|
||
// CHECK: OpEntryPoint Fragment %psmain "psmain" %gl_HelperInvocation %out_var_SV_Target0 | ||
// CHECK: OpDecorate %gl_HelperInvocation BuiltIn HelperInvocation | ||
// CHECK: %gl_HelperInvocation = OpVariable %_ptr_Input_bool Input | ||
|
||
[[vk::ext_builtin_input(23 /* BuiltInHelperInvocation */)]] | ||
static const bool HelperInvocation; | ||
|
||
[shader("pixel")] | ||
float4 psmain() : SV_Target0 { | ||
|
||
if (HelperInvocation) | ||
return 0; | ||
return 1; | ||
} |