summaryrefslogtreecommitdiffstats
path: root/tests/spirv
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-04-02 16:30:06 -0700
committerGitHub <noreply@github.com>2024-04-02 16:30:06 -0700
commitc0482ec12d683e53aca56543b620a4ec02082e29 (patch)
tree3fb3b33a96da15e7a1378680d03b69a934f9f604 /tests/spirv
parent539d368a32ec0afa44c195615baf50dafe602563 (diff)
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.
Diffstat (limited to 'tests/spirv')
-rw-r--r--tests/spirv/depth-replacing-none.slang17
1 files changed, 17 insertions, 0 deletions
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;
+}