[Piglit] [PATCH v2 2/2] Test multiple inout parameters with arrays of arrays

Juan A. Suarez Romero jasuarez at igalia.com
Mon May 9 14:51:08 UTC 2016


---
 ...nout-index-inout-vec4-array-element.shader_test | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 tests/spec/arb_arrays_of_arrays/execution/inout/vs-inout-index-inout-vec4-array-element.shader_test

diff --git a/tests/spec/arb_arrays_of_arrays/execution/inout/vs-inout-index-inout-vec4-array-element.shader_test b/tests/spec/arb_arrays_of_arrays/execution/inout/vs-inout-index-inout-vec4-array-element.shader_test
new file mode 100644
index 0000000..1136f28
--- /dev/null
+++ b/tests/spec/arb_arrays_of_arrays/execution/inout/vs-inout-index-inout-vec4-array-element.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.20
+GL_ARB_arrays_of_arrays
+
+[vertex shader]
+#extension GL_ARB_arrays_of_arrays : enable
+
+uniform int u = 1;
+varying vec4 color;
+
+void func(inout int i, inout float f)
+{
+  i = 0;
+  f = 1.;
+}
+
+void main()
+{
+  vec4 v[2][2] = vec4[2][2](vec4[2](vec4(0.), vec4(0.)),
+                            vec4[2](vec4(0.), vec4(0.)));
+  int i = u;
+
+  func(i, v[1][i][1]);
+  color = v[1][1];
+  gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+varying vec4 color;
+
+void main()
+{
+  gl_FragColor = color;
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgb 0. 1. 0.
-- 
2.5.5



More information about the Piglit mailing list