forked from shader-slang/slang
-
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.
Make fvk-invert-y work on mesh shader ouptuts. (shader-slang#5760)
Co-authored-by: Ellie Hermaszewska <[email protected]>
- Loading branch information
1 parent
46aee66
commit bd50f99
Showing
2 changed files
with
62 additions
and
29 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,24 @@ | ||
//TEST:SIMPLE(filecheck=CHECK): -target spirv -fvk-invert-y | ||
|
||
// CHECK: %[[CONST:[0-9]+]] = OpConstantComposite %v4float %float_0 %float_n1 %float_0 %float_0 | ||
// CHECK: OpStore {{.*}} %[[CONST]] | ||
|
||
struct PS_IN | ||
{ | ||
float4 vPositionPs : SV_Position; | ||
}; | ||
|
||
[ shader("mesh") ] | ||
[ outputtopology( "line" ) ] | ||
[ numthreads( 64, 1, 1 ) ] | ||
void main( | ||
uint nThreadId : SV_DispatchThreadID, | ||
uint nGroupThreadId : SV_GroupThreadID, | ||
uint nGroupId : SV_GroupID, | ||
out vertices PS_IN outputVerts[ 128 ], | ||
out indices uint2 outputIB[ 64 ] ) | ||
{ | ||
SetMeshOutputCounts( 128, 64 ); | ||
|
||
outputVerts[ 2 * nGroupThreadId ].vPositionPs = float4( 0, 1, 0, 0 ); | ||
} |