Module: vkd3d
Branch: master
Commit: 68c232cfaba27d667e3741fc415f9168a6f32dee
URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/68c232cfaba27d667e3741fc415f9…
Author: Zebediah Figura <zfigura(a)codeweavers.com>
Date: Sat Sep 11 19:19:37 2021 -0500
tests: Test entry point semantics on function declarations.
---
Makefile.am | 1 +
tests/entry-point-semantics.shader_test | 52 +++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 959da8f5..f9199472 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -59,6 +59,7 @@ vkd3d_shader_tests = \
tests/cbuffer.shader_test \
tests/compute.shader_test \
tests/conditional.shader_test \
+ tests/entry-point-semantics.shader_test \
tests/exp.shader_test \
tests/floor.shader_test \
tests/frac.shader_test \
diff --git a/tests/entry-point-semantics.shader_test
b/tests/entry-point-semantics.shader_test
new file mode 100644
index 00000000..a32a0e7b
--- /dev/null
+++ b/tests/entry-point-semantics.shader_test
@@ -0,0 +1,52 @@
+% Test how semantics are determined when spread across the entry point's
+% definition and its declarations.
+
+[vertex shader]
+void main(out float tex : texcoord, inout float4 pos : sv_position)
+{
+ tex = 0.2;
+}
+
+[pixel shader fail]
+
+float4 main(float tex : texcoord) : sv_target;
+
+float4 main(float tex)
+{
+ return tex;
+}
+
+[pixel shader fail]
+
+float4 main(float tex)
+{
+ return tex;
+}
+
+float4 main(float tex : texcoord) : sv_target;
+
+[pixel shader]
+
+float4 main(float tex : bogus) : bogus;
+
+float4 main(float tex : texcoord) : sv_target
+{
+ return tex;
+}
+
+[test]
+draw quad
+probe (0, 0) rgba (0.2, 0.2, 0.2, 0.2)
+
+[pixel shader]
+
+float4 main(float tex : texcoord) : sv_target
+{
+ return tex;
+}
+
+float4 main(float tex : bogus) : bogus;
+
+[test]
+draw quad
+probe (0, 0) rgba (0.2, 0.2, 0.2, 0.2)