Zebediah Figura : tests: Import HLSL struct assignment tests from Wine.

Alexandre Julliard julliard at winehq.org
Mon Oct 5 15:46:14 CDT 2020


Module: vkd3d
Branch: master
Commit: ce7c9649357aeceeaab5eb027603ed1da6912d57
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=ce7c9649357aeceeaab5eb027603ed1da6912d57

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Sat Oct  3 16:24:23 2020 -0500

tests: Import HLSL struct assignment tests from Wine.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 Makefile.am                              |  2 ++
 tests/hlsl-struct-assignment.shader_test | 23 +++++++++++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 415e686..f3a5967 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -57,6 +57,7 @@ vkd3d_shader_tests = \
 	tests/hlsl-majority-typedef.shader_test \
 	tests/hlsl-return-implicit-conversion.shader_test \
 	tests/hlsl-return-void.shader_test \
+	tests/hlsl-struct-assignment.shader_test \
 	tests/hlsl-vector-indexing.shader_test \
 	tests/hlsl-vector-indexing-uniform.shader_test \
 	tests/math.shader_test \
@@ -195,6 +196,7 @@ XFAIL_TESTS = \
 	tests/hlsl-majority-typedef.shader_test \
 	tests/hlsl-return-implicit-conversion.shader_test \
 	tests/hlsl-return-void.shader_test \
+	tests/hlsl-struct-assignment.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-assignment.shader_test b/tests/hlsl-struct-assignment.shader_test
new file mode 100644
index 0000000..ea55b9a
--- /dev/null
+++ b/tests/hlsl-struct-assignment.shader_test
@@ -0,0 +1,23 @@
+[pixel shader]
+struct apple
+{
+    struct
+    {
+        float4 a;
+    } m;
+    float4 b;
+};
+
+float4 main() : sv_target
+{
+    struct apple q, r, s;
+
+    q.m.a = float4(0.1, 0.2, 0.3, 0.4);
+    q.b = float4(0.5, 0.1, 0.4, 0.5);
+    s = r = q;
+    return s.m.a + s.b;
+}
+
+[test]
+draw quad
+probe all rgba (0.6, 0.3, 0.7, 0.9) 1




More information about the wine-cvs mailing list