From c0482ec12d683e53aca56543b620a4ec02082e29 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 2 Apr 2024 16:30:06 -0700 Subject: Fix the erroneous logic of determining whether or not to emit DepthReplacing. (#3885) * Fix the erroneous logic of determining whether or not to emit DepthReplacing. Closes #3884. * Fix. * More cleanup. --- tests/spirv/depth-replacing-none.slang | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/spirv/depth-replacing-none.slang (limited to 'tests') diff --git a/tests/spirv/depth-replacing-none.slang b/tests/spirv/depth-replacing-none.slang new file mode 100644 index 000000000..15932356d --- /dev/null +++ b/tests/spirv/depth-replacing-none.slang @@ -0,0 +1,17 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv -stage fragment -entry main -emit-spirv-directly + +// Test that a fragment shader that does not modify depth does not +// have a DepthReplacing decoration. + +struct PSOut +{ + float4 color : SV_Target; +} +// CHECK-NOT: OpExecutionMode {{.*}} DepthReplacing + +PSOut main() +{ + PSOut psout; + psout.color = float4(1.0f, 0.0f, 0.0f, 1.0f); + return psout; +} -- cgit v1.2.3