From 2768e429e556f3978825beaf71cf361626057135 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 3 Apr 2024 13:13:09 -0700 Subject: Not emit DepthReplacing when frag shader uses SV_Position. (#3893) --- tests/spirv/depth-replacing-none.slang | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/spirv/depth-replacing-none.slang b/tests/spirv/depth-replacing-none.slang index 15932356d..8eec8daff 100644 --- a/tests/spirv/depth-replacing-none.slang +++ b/tests/spirv/depth-replacing-none.slang @@ -9,9 +9,10 @@ struct PSOut } // CHECK-NOT: OpExecutionMode {{.*}} DepthReplacing -PSOut main() +// Using SV_Position does not cause us generate DepthReplacing. +PSOut main(float4 pos : SV_Position) { PSOut psout; - psout.color = float4(1.0f, 0.0f, 0.0f, 1.0f); + psout.color = pos; return psout; } -- cgit v1.2.3