summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordubiousconst282 <87553666+dubiousconst282@users.noreply.github.com>2025-06-18 21:13:29 -0300
committerGitHub <noreply@github.com>2025-06-19 00:13:29 +0000
commit82418b16a135825e51a2afda3c6a00758615ba27 (patch)
tree9fba759029af20814285010679599cec12535fde /tests
parent9bcbf59b6a541ec90e3d3633ec7e53cf1ae3a890 (diff)
Always emit DepthReplacing execution mode when writing to FragDepth (#7450)
Diffstat (limited to 'tests')
-rw-r--r--tests/spirv/depth-replacing-gt-lt.slang16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/spirv/depth-replacing-gt-lt.slang b/tests/spirv/depth-replacing-gt-lt.slang
new file mode 100644
index 000000000..8e0ce6b79
--- /dev/null
+++ b/tests/spirv/depth-replacing-gt-lt.slang
@@ -0,0 +1,16 @@
+//TEST:SIMPLE(filecheck=CHECK): -target spirv
+// CHECK: OpExecutionMode {{.*}} DepthReplacing
+// CHECK: OpExecutionMode %FS_WriteDepthGt DepthGreater
+// CHECK: OpExecutionMode %FS_WriteDepthLt DepthLess
+
+[shader("fragment")]
+void FS_WriteDepthGt(out float depth: SV_DepthGreaterEqual)
+{
+ depth = 0.5;
+}
+
+[shader("fragment")]
+void FS_WriteDepthLt(out float depth: SV_DepthLessEqual)
+{
+ depth = 0.5;
+}