-
Notifications
You must be signed in to change notification settings - Fork 692
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPIRV] Add SM6.6 IsHelperLane (#5488)
Fix #5427
- Loading branch information
1 parent
4b6e799
commit daeba0c
Showing
7 changed files
with
72 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
13 changes: 13 additions & 0 deletions
13
tools/clang/test/CodeGenSPIRV/intrinsics.sm6_6.ishelperlane.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,13 @@ | ||
// RUN: %dxc -T ps_6_0 -E main | ||
|
||
// CHECK-NOT: OpDecorate {{%\w+}} BuiltIn HelperInvocation | ||
|
||
float4 main() : SV_Target { | ||
float ret = 1.0; | ||
|
||
if (IsHelperLane()) ret = 2.0; | ||
|
||
return ret; | ||
} | ||
// CHECK: [[HelperInvocation:%\d+]] = OpIsHelperInvocationEXT %bool | ||
// CHECK: OpBranchConditional [[HelperInvocation]] |
18 changes: 18 additions & 0 deletions
18
tools/clang/test/CodeGenSPIRV/intrinsics.sm6_6.ishelperlane.vk1p3.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,18 @@ | ||
// RUN: %dxc -T ps_6_0 -E main -fspv-target-env=vulkan1.3 | ||
|
||
// CHECK: OpEntryPoint Fragment | ||
// CHECK-SAME: %gl_HelperInvocation | ||
|
||
// CHECK: OpDecorate %gl_HelperInvocation BuiltIn HelperInvocation | ||
|
||
// CHECK: %gl_HelperInvocation = OpVariable %_ptr_Input_bool Input | ||
|
||
float4 main() : SV_Target { | ||
// CHECK: [[val:%\d+]] = OpLoad %bool %gl_HelperInvocation | ||
// CHECK: OpBranchConditional [[val]] | ||
float ret = 1.0; | ||
|
||
if (IsHelperLane()) ret = 2.0; | ||
|
||
return ret; | ||
} |
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