From bd50f9947905feb5199c7cfe29c640084f882199 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 4 Dec 2024 21:19:25 -0800 Subject: Make fvk-invert-y work on mesh shader ouptuts. (#5760) Co-authored-by: Ellie Hermaszewska --- tests/spirv/mesh-shader-invert-y.slang | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/spirv/mesh-shader-invert-y.slang (limited to 'tests') diff --git a/tests/spirv/mesh-shader-invert-y.slang b/tests/spirv/mesh-shader-invert-y.slang new file mode 100644 index 000000000..e385167ae --- /dev/null +++ b/tests/spirv/mesh-shader-invert-y.slang @@ -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 ); +} -- cgit v1.2.3