Zebediah Figura : tests: Test redefining intrinsic functions.

Alexandre Julliard julliard at winehq.org
Wed Jan 19 15:52:11 CST 2022


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

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Wed Jan 19 12:52:01 2022 +0100

tests: Test redefining intrinsic functions.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni 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-intrinsic-override.shader_test | 31 +++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 20fee06..0c2fbf7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,6 +68,7 @@ vkd3d_shader_tests = \
 	tests/hlsl-duplicate-modifiers.shader_test \
 	tests/hlsl-for.shader_test \
 	tests/hlsl-function-overload.shader_test \
+	tests/hlsl-intrinsic-override.shader_test \
 	tests/hlsl-invalid.shader_test \
 	tests/hlsl-majority-pragma.shader_test \
 	tests/hlsl-majority-typedef.shader_test \
@@ -293,6 +294,7 @@ XFAIL_TESTS = \
 	tests/hlsl-duplicate-modifiers.shader_test \
 	tests/hlsl-for.shader_test \
 	tests/hlsl-function-overload.shader_test \
+	tests/hlsl-intrinsic-override.shader_test \
 	tests/hlsl-majority-pragma.shader_test \
 	tests/hlsl-majority-typedef.shader_test \
 	tests/hlsl-nested-arrays.shader_test \
diff --git a/tests/hlsl-intrinsic-override.shader_test b/tests/hlsl-intrinsic-override.shader_test
new file mode 100644
index 0000000..55a23f2
--- /dev/null
+++ b/tests/hlsl-intrinsic-override.shader_test
@@ -0,0 +1,31 @@
+[pixel shader]
+
+float2 max(float2 a, float2 b)
+{
+    return a + b;
+}
+
+float4 main() : sv_target
+{
+    return float4(max(0.1, 0.2), max(float2(0.1, 0.2), float2(0.3, 0.4)));
+}
+
+[test]
+draw quad
+probe all rgba (0.3, 0.3, 0.4, 0.6)
+
+[pixel shader]
+
+float2 max(float2 a, float3 b)
+{
+    return a + b.xy;
+}
+
+float4 main() : sv_target
+{
+    return float4(max(0.1, 0.2), max(float2(0.1, 0.2), float2(0.3, 0.4)));
+}
+
+[test]
+draw quad
+probe all rgba (0.3, 0.3, 0.3, 0.4)




More information about the wine-cvs mailing list