[PATCH vkd3d 2/4] tests: Import HLSL struct varying tests from Wine.
Zebediah Figura
zfigura at codeweavers.com
Sat Oct 3 16:24:24 CDT 2020
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
Makefile.am | 2 ++
tests/hlsl-struct-varying.shader_test | 29 +++++++++++++++++++++++++++
2 files changed, 31 insertions(+)
create mode 100644 tests/hlsl-struct-varying.shader_test
diff --git a/Makefile.am b/Makefile.am
index f3a5967d..ce0d193c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -58,6 +58,7 @@ vkd3d_shader_tests = \
tests/hlsl-return-implicit-conversion.shader_test \
tests/hlsl-return-void.shader_test \
tests/hlsl-struct-assignment.shader_test \
+ tests/hlsl-struct-varying.shader_test \
tests/hlsl-vector-indexing.shader_test \
tests/hlsl-vector-indexing-uniform.shader_test \
tests/math.shader_test \
@@ -197,6 +198,7 @@ XFAIL_TESTS = \
tests/hlsl-return-implicit-conversion.shader_test \
tests/hlsl-return-void.shader_test \
tests/hlsl-struct-assignment.shader_test \
+ tests/hlsl-struct-varying.shader_test \
tests/hlsl-vector-indexing.shader_test \
tests/hlsl-vector-indexing-uniform.shader_test \
tests/math.shader_test \
diff --git a/tests/hlsl-struct-varying.shader_test b/tests/hlsl-struct-varying.shader_test
new file mode 100644
index 00000000..b623a998
--- /dev/null
+++ b/tests/hlsl-struct-varying.shader_test
@@ -0,0 +1,29 @@
+[pixel shader]
+struct input
+{
+ struct
+ {
+ float4 pos : sv_position;
+ } m;
+};
+
+struct output
+{
+ struct
+ {
+ float4 color : sv_target;
+ } m;
+};
+
+struct output main(struct input i)
+{
+ struct output o;
+ o.m.color = i.m.pos;
+ return o;
+}
+
+[test]
+draw quad
+probe rgba (0, 1) (0.5, 1.5, 0.0, 1.0)
+probe rgba (1, 0) (1.5, 0.5, 0.0, 1.0)
+probe rgba (3, 5) (3.5, 5.5, 0.0, 1.0)
--
2.28.0
More information about the wine-devel
mailing list