[PATCH vkd3d 3/8] tests: Test initialization of implicit size arrays.

Giovanni Mascellani gmascellani at codeweavers.com
Thu Apr 28 08:32:00 CDT 2022


From: Francisco Casas <fcasas at codeweavers.com>

Signed-off-by: Francisco Casas <fcasas at codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
---
 Makefile.am                                    |  1 +
 ...hlsl-initializer-implicit-array.shader_test | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 tests/hlsl-initializer-implicit-array.shader_test

diff --git a/Makefile.am b/Makefile.am
index fa3c2a6d..2742e77c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -77,6 +77,7 @@ vkd3d_shader_tests = \
 	tests/hlsl-gather.shader_test \
 	tests/hlsl-initializer-flatten.shader_test \
 	tests/hlsl-initializer-invalid-arg-count.shader_test \
+	tests/hlsl-initializer-implicit-array.shader_test \
 	tests/hlsl-initializer-local-array.shader_test \
 	tests/hlsl-initializer-nested.shader_test \
 	tests/hlsl-initializer-numeric.shader_test \
diff --git a/tests/hlsl-initializer-implicit-array.shader_test b/tests/hlsl-initializer-implicit-array.shader_test
new file mode 100644
index 00000000..d2b94da4
--- /dev/null
+++ b/tests/hlsl-initializer-implicit-array.shader_test
@@ -0,0 +1,18 @@
+[pixel shader]
+float4 main() : SV_TARGET
+{
+    float4 arr[] = {10, 20, 30, 40, 50, 60, 70, 80};
+    return arr[1];
+}
+
+[test]
+todo draw quad
+todo probe all rgba (50, 60, 70, 80)
+
+
+[pixel shader fail]
+float4 main() : SV_TARGET
+{
+    float4 arr[] = {10, 20, 30, 40, 50, 60, 70};
+    return arr[0];
+}
-- 
2.36.0




More information about the wine-devel mailing list