summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-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;
+}