[PATCH vkd3d v2 2/7] tests: Test casts to half.
Zebediah Figura
zfigura at codeweavers.com
Thu Sep 9 21:11:33 CDT 2021
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
Makefile.am | 2 ++
tests/cast-to-half.shader_test | 29 +++++++++++++++++++++++++++++
2 files changed, 31 insertions(+)
create mode 100644 tests/cast-to-half.shader_test
diff --git a/Makefile.am b/Makefile.am
index d707a26b3..a1b6eb31b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,6 +55,7 @@ vkd3d_shader_runners = \
vkd3d_shader_tests = \
tests/cast-to-float.shader_test \
+ tests/cast-to-half.shader_test \
tests/conditional.shader_test \
tests/hlsl-array-dimension.shader_test \
tests/hlsl-bool-cast.shader_test \
@@ -268,6 +269,7 @@ tests_vkd3d_shader_api_LDADD = libvkd3d-shader.la
SHADER_TEST_LOG_COMPILER = tests/shader_runner_d3d12
XFAIL_TESTS = \
tests/cast-to-float.shader_test \
+ tests/cast-to-half.shader_test \
tests/conditional.shader_test \
tests/hlsl-array-dimension.shader_test \
tests/hlsl-bool-cast.shader_test \
diff --git a/tests/cast-to-half.shader_test b/tests/cast-to-half.shader_test
new file mode 100644
index 000000000..6db5412de
--- /dev/null
+++ b/tests/cast-to-half.shader_test
@@ -0,0 +1,29 @@
+[pixel shader]
+
+float4 main(uniform int i, uniform uint u, uniform bool b, uniform float f) : sv_target
+{
+ return float4(((half)i) + 1.5, ((half)u) - 2.5, ((half)b) / 2, f);
+}
+
+[test]
+uniform 0 int -1
+uniform 1 uint 3
+uniform 2 int -2
+uniform 3 float 0.5
+draw quad
+probe all rgba (0.5, 0.5, 0.5, 0.5)
+
+[pixel shader]
+
+float4 main() : sv_target
+{
+ int i = -1;
+ uint u = 3;
+ bool b = true;
+ float f = 0.5;
+ return float4(((half)i) + 1.5, ((half)u) - 2.5, ((half)b) / 2, f);
+}
+
+[test]
+draw quad
+probe all rgba (0.5, 0.5, 0.5, 0.5)
--
2.33.0
More information about the wine-devel
mailing list