[Piglit] [PATCH 5/5] glsl-1.30: Test multiple large local arrays
Glenn Kennard
glenn.kennard at gmail.com
Mon Mar 6 23:11:18 UTC 2017
---
.../fs-multiple-large-local-arrays.shader_test | 35 ++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 tests/spec/glsl-1.30/execution/fs-multiple-large-local-arrays.shader_test
diff --git a/tests/spec/glsl-1.30/execution/fs-multiple-large-local-arrays.shader_test b/tests/spec/glsl-1.30/execution/fs-multiple-large-local-arrays.shader_test
new file mode 100644
index 0000000..1ad6a46
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/fs-multiple-large-local-arrays.shader_test
@@ -0,0 +1,35 @@
+# Both arrays will typically not fit into the GPU's
+# fastest storage type, requiring at least one to
+# be spilled/reloaded from a slower memory.
+# Test that this still produces correct values for array
+# elements.
+[require]
+GLSL >= 1.30
+
+[vertex shader passthrough]
+
+[fragment shader]
+uniform uint i;
+void main()
+{
+ uint A[60];
+ uint B[70];
+ A[20] = 0u;
+ A[i] = 37u;
+ B[20] = 0u;
+ B[i] = 39u;
+ gl_FragColor.rba = vec3(0.0, 0.0, 1.0);
+ gl_FragColor.g = float(A[20] == 37u && B[20] == 39u);
+}
+
+[test]
+clear color 1.0 0.0 0.0 1.0
+clear
+uniform uint i 19
+draw rect -1 -1 2 2
+probe all rgba 0.0 0.0 0.0 1.0
+
+clear
+uniform uint i 20
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
--
2.7.4
More information about the Piglit
mailing list