Giovanni Mascellani : tests: Test arithmetic int operations without constant operands.
Alexandre Julliard
julliard at winehq.org
Tue Jul 5 15:52:01 CDT 2022
Module: vkd3d
Branch: master
Commit: 2ec6d4d3ffe453fc20bf05d2049a7ea28c767323
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=2ec6d4d3ffe453fc20bf05d2049a7ea28c767323
Author: Giovanni Mascellani <gmascellani at codeweavers.com>
Date: Fri Jul 1 11:23:34 2022 +0200
tests: Test arithmetic int operations without constant operands.
Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
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 | 1 +
tests/arithmetic-int-uniform.shader_test | 29 +++++++++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 0cb90b2b..60db7794 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -54,6 +54,7 @@ vkd3d_shader_tests = \
tests/abs.shader_test \
tests/arithmetic-float.shader_test \
tests/arithmetic-int.shader_test \
+ tests/arithmetic-int-uniform.shader_test \
tests/arithmetic-uint.shader_test \
tests/bitwise.shader_test \
tests/cast-broadcast.shader_test \
diff --git a/tests/arithmetic-int-uniform.shader_test b/tests/arithmetic-int-uniform.shader_test
new file mode 100644
index 00000000..ff80a9b0
--- /dev/null
+++ b/tests/arithmetic-int-uniform.shader_test
@@ -0,0 +1,29 @@
+[pixel shader]
+uniform float2 a;
+
+float4 main() : SV_TARGET
+{
+ int x = a.x;
+ int y = a.y;
+ return float4(x + y, x - y, x * y, x / y);
+}
+
+[test]
+uniform 0 float4 5.0 16.0 0.0 0.0
+todo draw quad
+probe all rgba (21.0, -11.0, 80.0, 0.0)
+
+[pixel shader]
+uniform float2 a;
+
+float4 main() : SV_TARGET
+{
+ int x = a.x;
+ int y = a.y;
+ return float4(x % y, +x, -x, y / x);
+}
+
+[test]
+uniform 0 float4 5.0 16.0 0.0 0.0
+todo draw quad
+probe all rgba (5.0, 5.0, -5.0, 3.0)
More information about the wine-cvs
mailing list