Zebediah Figura : tests: Import HLSL majority tests from Wine.

Alexandre Julliard julliard at winehq.org
Fri Oct 2 14:49:22 CDT 2020


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

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Thu Oct  1 23:09:48 2020 -0500

tests: Import HLSL majority 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                             |  4 ++++
 tests/hlsl-majority-pragma.shader_test  | 21 +++++++++++++++++++++
 tests/hlsl-majority-typedef.shader_test | 22 ++++++++++++++++++++++
 3 files changed, 47 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 7911a8e..415e686 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,6 +53,8 @@ vkd3d_shader_tests = \
 	tests/conditional.shader_test \
 	tests/hlsl-array-dimension.shader_test \
 	tests/hlsl-comma.shader_test \
+	tests/hlsl-majority-pragma.shader_test \
+	tests/hlsl-majority-typedef.shader_test \
 	tests/hlsl-return-implicit-conversion.shader_test \
 	tests/hlsl-return-void.shader_test \
 	tests/hlsl-vector-indexing.shader_test \
@@ -189,6 +191,8 @@ XFAIL_TESTS = \
 	tests/conditional.shader_test \
 	tests/hlsl-array-dimension.shader_test \
 	tests/hlsl-comma.shader_test \
+	tests/hlsl-majority-pragma.shader_test \
+	tests/hlsl-majority-typedef.shader_test \
 	tests/hlsl-return-implicit-conversion.shader_test \
 	tests/hlsl-return-void.shader_test \
 	tests/hlsl-vector-indexing.shader_test \
diff --git a/tests/hlsl-majority-pragma.shader_test b/tests/hlsl-majority-pragma.shader_test
new file mode 100644
index 0000000..e7fc75c
--- /dev/null
+++ b/tests/hlsl-majority-pragma.shader_test
@@ -0,0 +1,21 @@
+[pixel shader]
+#pragma pack_matrix(row_major)
+uniform float2x2 r;
+#pragma pack_matrix(column_major)
+uniform float2x2 c;
+
+float4 main() : sv_target
+{
+    float4 ret;
+    ret.xy = mul(r, float2(0.5, 0.6));
+    ret.zw = mul(c, float2(0.5, 0.6));
+    return ret;
+}
+
+[test]
+uniform  0 float4 0.1 0.2 0.0 0.0
+uniform  4 float4 0.3 0.4 0.0 0.0
+uniform  8 float4 0.1 0.3 0.0 0.0
+uniform 12 float4 0.2 0.4 0.0 0.0
+draw quad
+probe all rgba (0.17, 0.39, 0.17, 0.39) 1
diff --git a/tests/hlsl-majority-typedef.shader_test b/tests/hlsl-majority-typedef.shader_test
new file mode 100644
index 0000000..1460e9a
--- /dev/null
+++ b/tests/hlsl-majority-typedef.shader_test
@@ -0,0 +1,22 @@
+[pixel shader]
+typedef float2x2 matrix_t;
+typedef row_major matrix_t row_matrix_t;
+typedef column_major matrix_t col_matrix_t;
+uniform row_matrix_t r;
+uniform col_matrix_t c;
+
+float4 main() : sv_target
+{
+    float4 ret;
+    ret.xy = mul(r, float2(0.5, 0.6));
+    ret.zw = mul(c, float2(0.5, 0.6));
+    return ret;
+}
+
+[test]
+uniform  0 float4 0.1 0.2 0.0 0.0
+uniform  4 float4 0.3 0.4 0.0 0.0
+uniform  8 float4 0.1 0.3 0.0 0.0
+uniform 12 float4 0.2 0.4 0.0 0.0
+draw quad
+probe all rgba (0.17, 0.39, 0.17, 0.39) 1




More information about the wine-cvs mailing list