From: Gert Wollny <gert.wol...@collabora.com>

The tests use large arrays that need likely to be spilled. In order to check
correct spilling of all components actually use all components in the test.

v2: - use uniforms to pass the test values to make it more likely that the 
writing
      to the array elements is done in one instruction group
    - simplify the vec4 test
    - also correct the vec3 test

Signed-off-by: Gert Wollny <gert.wol...@collabora.com>
---
The first version is probably stuck in the moderation pipeline because I used 
an e-mail 
that is not subscribed to the list. 

Thanks for reviewing,
Gert

 .../execution/fs-large-local-array-vec2.shader_test         |  9 ++++++---
 .../execution/fs-large-local-array-vec3.shader_test         |  9 ++++++---
 .../execution/fs-large-local-array-vec4.shader_test         | 13 ++++++++-----
 3 files changed, 20 insertions(+), 11 deletions(-)

diff --git 
a/tests/spec/glsl-1.30/execution/fs-large-local-array-vec2.shader_test 
b/tests/spec/glsl-1.30/execution/fs-large-local-array-vec2.shader_test
index d83c222e6..8aa8d60c6 100644
--- a/tests/spec/glsl-1.30/execution/fs-large-local-array-vec2.shader_test
+++ b/tests/spec/glsl-1.30/execution/fs-large-local-array-vec2.shader_test
@@ -5,23 +5,26 @@ GLSL >= 1.30
 
 [fragment shader]
 uniform uint i;
+uniform vec2 value;
 void main()
 {
        vec2 A[130];
-       A[20].g = 0;
-       A[i].g = 37;
+       A[20].rg = vec2(0, 0);
+       A[i].rg = value;
        gl_FragColor.rba = vec3(0.0, 0.0, 1.0);
-       gl_FragColor.g = float(A[20].g == 37);
+       gl_FragColor.g = float(A[20] == value);
 }
 
 [test]
 clear color 1.0 0.0 0.0 1.0
 clear
 uniform uint i 19
+uniform vec2 value 22.1 13.4
 draw rect -1 -1 2 2
 probe all rgba 0.0 0.0 0.0 1.0
 
 clear
 uniform uint i 20
+uniform vec2 value 22.1 13.4
 draw rect -1 -1 2 2
 probe all rgba 0.0 1.0 0.0 1.0
diff --git 
a/tests/spec/glsl-1.30/execution/fs-large-local-array-vec3.shader_test 
b/tests/spec/glsl-1.30/execution/fs-large-local-array-vec3.shader_test
index 55a8c3dcf..272ad25ef 100644
--- a/tests/spec/glsl-1.30/execution/fs-large-local-array-vec3.shader_test
+++ b/tests/spec/glsl-1.30/execution/fs-large-local-array-vec3.shader_test
@@ -5,23 +5,26 @@ GLSL >= 1.30
 
 [fragment shader]
 uniform uint i;
+uniform vec3 value;
 void main()
 {
        vec3 A[130];
-       A[20].g = 0;
-       A[i].g = 37;
+       A[20].rgb = vec3(0.0, 0.0, 0.0);
+       A[i].rgb = value;
        gl_FragColor.rba = vec3(0.0, 0.0, 1.0);
-       gl_FragColor.g = float(A[20].g == 37);
+       gl_FragColor.g = float(A[20] == value);
 }
 
 [test]
 clear color 1.0 0.0 0.0 1.0
 clear
 uniform uint i 19
+uniform vec3 value 1.1 2.2 3.3
 draw rect -1 -1 2 2
 probe all rgba 0.0 0.0 0.0 1.0
 
 clear
 uniform uint i 20
+uniform vec3 value 1.1 2.2 3.3
 draw rect -1 -1 2 2
 probe all rgba 0.0 1.0 0.0 1.0
diff --git 
a/tests/spec/glsl-1.30/execution/fs-large-local-array-vec4.shader_test 
b/tests/spec/glsl-1.30/execution/fs-large-local-array-vec4.shader_test
index 29b222342..c2f8fc20e 100644
--- a/tests/spec/glsl-1.30/execution/fs-large-local-array-vec4.shader_test
+++ b/tests/spec/glsl-1.30/execution/fs-large-local-array-vec4.shader_test
@@ -5,24 +5,27 @@ GLSL >= 1.30
 
 [fragment shader]
 uniform uint i;
+uniform vec4 value;
+
 void main()
 {
        vec4 A[130];
-       A[20].g = 0;
-       A[i].g = 37;
-       A[i].r = 1;
-       gl_FragColor.rba = vec3(0.0, 0.0, 1.0);
-       gl_FragColor.g = float(A[20].g == 37);
+   A[20] = vec4(0.0, 0.0, 0.0, 0.0);
+       A[i] = value;
+   gl_FragColor.rba = vec3(0.0, 0.0, 1.0);
+       gl_FragColor.g = float(A[20] == value);
 }
 
 [test]
 clear color 1.0 0.0 0.0 1.0
 clear
 uniform uint i 19
+uniform vec4 value 22.0 12.0 34.0 2.0
 draw rect -1 -1 2 2
 probe all rgba 0.0 0.0 0.0 1.0
 
 clear
 uniform uint i 20
+uniform vec4 value 22.0 12.0 34.0 2.0
 draw rect -1 -1 2 2
 probe all rgba 0.0 1.0 0.0 1.0
-- 
2.16.4

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to