[PATCH vkd3d 5/5] tests: Test arithmetic int operations without constant operands.

Giovanni Mascellani gmascellani at codeweavers.com
Wed Jun 29 09:55:55 CDT 2022


Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
---
 Makefile.am                              |  1 +
 tests/arithmetic-int-uniform.shader_test | 28 ++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 tests/arithmetic-int-uniform.shader_test

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..9bd7f2ac
--- /dev/null
+++ b/tests/arithmetic-int-uniform.shader_test
@@ -0,0 +1,28 @@
+[require]
+shader model >= 4.0
+
+[pixel shader]
+uniform int x, y;
+
+float4 main() : SV_TARGET
+{
+    return float4(x + y, x - y, x * y, x / y);
+}
+
+[test]
+uniform 0 int4 5 15 0 0
+todo draw quad
+probe all rgba (20.0, -10.0, 75.0, 0.0)
+
+[pixel shader]
+uniform int x, y;
+
+float4 main() : SV_TARGET
+{
+    return float4(x % y, +x, -x, y / x);
+}
+
+[test]
+uniform 0 int4 5 15 0 0
+todo draw quad
+probe all rgba (5.0, 5.0, -5.0, 3.0)
-- 
2.36.1




More information about the wine-devel mailing list