On 4 November 2011 16:56, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org">idr@freedesktop.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
From: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
<br>
Optimizing GLSL linkers may reduce the size of the uniform array if<br>
tail elements are not accessed. Shader runner will fail the test if<br>
one of the set uniforms doesn't have a location.<br>
<br>
Previously these tests would fail on AMD's closed-source driver for<br>
this reason. Now they pass.<br>
<br>
Signed-off-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
---<br>
.../fs-uniform-array-mat2-col-rd.shader_test | 1 -<br>
.../fs-uniform-array-mat2-col-row-rd.shader_test | 1 -<br>
.../fs-uniform-array-mat2-rd.shader_test | 1 -<br>
.../fs-uniform-array-mat2-row-rd.shader_test | 1 -<br>
.../fs-uniform-array-mat3-col-rd.shader_test | 1 -<br>
.../fs-uniform-array-mat3-col-row-rd.shader_test | 1 -<br>
.../fs-uniform-array-mat3-rd.shader_test | 1 -<br>
.../fs-uniform-array-mat3-row-rd.shader_test | 1 -<br>
.../fs-uniform-array-mat4-col-rd.shader_test | 1 -<br>
.../fs-uniform-array-mat4-col-row-rd.shader_test | 1 -<br>
.../fs-uniform-array-mat4-rd.shader_test | 1 -<br>
.../fs-uniform-array-mat4-row-rd.shader_test | 1 -<br>
.../vs-uniform-array-mat2-col-rd.shader_test | 1 -<br>
.../vs-uniform-array-mat2-col-row-rd.shader_test | 1 -<br>
.../vs-uniform-array-mat2-rd.shader_test | 1 -<br>
.../vs-uniform-array-mat2-row-rd.shader_test | 1 -<br>
.../vs-uniform-array-mat3-col-rd.shader_test | 1 -<br>
.../vs-uniform-array-mat3-col-row-rd.shader_test | 1 -<br>
.../vs-uniform-array-mat3-rd.shader_test | 1 -<br>
.../vs-uniform-array-mat3-row-rd.shader_test | 1 -<br>
.../vs-uniform-array-mat4-col-rd.shader_test | 1 -<br>
.../vs-uniform-array-mat4-col-row-rd.shader_test | 1 -<br>
.../vs-uniform-array-mat4-rd.shader_test | 1 -<br>
.../vs-uniform-array-mat4-row-rd.shader_test | 1 -<br>
tests/spec/glsl-1.10/variable-index-read.sh | 9 ++++++++-<br>
25 files changed, 8 insertions(+), 25 deletions(-)<br>
<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-col-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-col-rd.shader_test<br>
index 97eb1ea..dc81d67 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-col-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-col-rd.shader_test<br>
@@ -36,7 +36,6 @@ ortho<br>
<br>
uniform mat2x2 m[0] 1.0 2.0 3.0 4.0<br>
uniform mat2x2 m[1] 5.0 6.0 7.0 8.0<br>
-uniform mat2x2 m[2] 9.0 10.0 11.0 12.0<br>
uniform int col 0<br>
uniform vec2 expect 5 6<br>
draw rect 45 5 10 10<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-col-row-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-col-row-rd.shader_test<br>
index 325b9b0..eb5495a 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-col-row-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-col-row-rd.shader_test<br>
@@ -38,7 +38,6 @@ ortho<br>
<br>
uniform mat2x2 m[0] 1.0 2.0 3.0 4.0<br>
uniform mat2x2 m[1] 5.0 6.0 7.0 8.0<br>
-uniform mat2x2 m[2] 9.0 10.0 11.0 12.0<br>
uniform int col 0<br>
uniform int row 0<br>
uniform float expect 5<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-rd.shader_test<br>
index 504d66d..f099e2e 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-rd.shader_test<br>
@@ -34,7 +34,6 @@ ortho<br>
<br>
uniform mat2x2 m[0] 1.0 2.0 3.0 4.0<br>
uniform mat2x2 m[1] 5.0 6.0 7.0 8.0<br>
-uniform mat2x2 m[2] 9.0 10.0 11.0 12.0<br>
uniform vec2 expect 7 8<br>
draw rect 60 5 10 10<br>
probe rgb 65 10 0.0 1.0 0.0<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-row-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-row-rd.shader_test<br>
index c96e55c..8208f6f 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-row-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat2-row-rd.shader_test<br>
@@ -36,7 +36,6 @@ ortho<br>
<br>
uniform mat2x2 m[0] 1.0 2.0 3.0 4.0<br>
uniform mat2x2 m[1] 5.0 6.0 7.0 8.0<br>
-uniform mat2x2 m[2] 9.0 10.0 11.0 12.0<br>
uniform int row 0<br>
uniform float expect 7<br>
draw rect 60 5 10 10<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-col-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-col-rd.shader_test<br>
index 02810f6..a3366d1 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-col-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-col-rd.shader_test<br>
@@ -36,7 +36,6 @@ ortho<br>
<br>
uniform mat3x3 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0<br>
uniform mat3x3 m[1] 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0<br>
-uniform mat3x3 m[2] 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0<br>
uniform int col 0<br>
uniform vec3 expect 10 11 12<br>
draw rect 60 5 10 10<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-col-row-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-col-row-rd.shader_test<br>
index da038be..2c64e99 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-col-row-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-col-row-rd.shader_test<br>
@@ -38,7 +38,6 @@ ortho<br>
<br>
uniform mat3x3 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0<br>
uniform mat3x3 m[1] 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0<br>
-uniform mat3x3 m[2] 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0<br>
uniform int col 0<br>
uniform int row 0<br>
uniform float expect 10<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-rd.shader_test<br>
index 0d631c9..49a6e45 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-rd.shader_test<br>
@@ -34,7 +34,6 @@ ortho<br>
<br>
uniform mat3x3 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0<br>
uniform mat3x3 m[1] 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0<br>
-uniform mat3x3 m[2] 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0<br>
uniform vec3 expect 13 14 15<br>
draw rect 75 5 10 10<br>
probe rgb 80 10 0.0 1.0 0.0<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-row-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-row-rd.shader_test<br>
index 0086592..bcb6a49 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-row-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat3-row-rd.shader_test<br>
@@ -36,7 +36,6 @@ ortho<br>
<br>
uniform mat3x3 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0<br>
uniform mat3x3 m[1] 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0<br>
-uniform mat3x3 m[2] 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0<br>
uniform int row 0<br>
uniform float expect 13<br>
draw rect 75 5 10 10<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-col-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-col-rd.shader_test<br>
index 570c990..8bf8590 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-col-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-col-rd.shader_test<br>
@@ -36,7 +36,6 @@ ortho<br>
<br>
uniform mat4x4 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0<br>
uniform mat4x4 m[1] 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 31.0 32.0<br>
-uniform mat4x4 m[2] 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0 42.0 43.0 44.0 45.0 46.0 47.0 48.0<br>
uniform int col 0<br>
uniform vec4 expect 17 18 19 20<br>
draw rect 75 5 10 10<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-col-row-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-col-row-rd.shader_test<br>
index cdc1d9d..b222503 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-col-row-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-col-row-rd.shader_test<br>
@@ -38,7 +38,6 @@ ortho<br>
<br>
uniform mat4x4 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0<br>
uniform mat4x4 m[1] 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 31.0 32.0<br>
-uniform mat4x4 m[2] 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0 42.0 43.0 44.0 45.0 46.0 47.0 48.0<br>
uniform int col 0<br>
uniform int row 0<br>
uniform float expect 17<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-rd.shader_test<br>
index 52f4a4f..e102384 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-rd.shader_test<br>
@@ -34,7 +34,6 @@ ortho<br>
<br>
uniform mat4x4 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0<br>
uniform mat4x4 m[1] 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 31.0 32.0<br>
-uniform mat4x4 m[2] 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0 42.0 43.0 44.0 45.0 46.0 47.0 48.0<br>
uniform vec4 expect 21 22 23 24<br>
draw rect 90 5 10 10<br>
probe rgb 95 10 0.0 1.0 0.0<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-row-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-row-rd.shader_test<br>
index 6e01a1c..72ca820 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-row-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/fs-uniform-array-mat4-row-rd.shader_test<br>
@@ -36,7 +36,6 @@ ortho<br>
<br>
uniform mat4x4 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0<br>
uniform mat4x4 m[1] 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 31.0 32.0<br>
-uniform mat4x4 m[2] 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0 42.0 43.0 44.0 45.0 46.0 47.0 48.0<br>
uniform int row 0<br>
uniform float expect 21<br>
draw rect 90 5 10 10<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-col-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-col-rd.shader_test<br>
index 8830f8f..c61f9d6 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-col-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-col-rd.shader_test<br>
@@ -37,7 +37,6 @@ ortho<br>
<br>
uniform mat2x2 m[0] 1.0 2.0 3.0 4.0<br>
uniform mat2x2 m[1] 5.0 6.0 7.0 8.0<br>
-uniform mat2x2 m[2] 9.0 10.0 11.0 12.0<br>
uniform int col 0<br>
uniform vec2 expect 5 6<br>
draw rect 45 5 10 10<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-col-row-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-col-row-rd.shader_test<br>
index dd2ede8..67f7544 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-col-row-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-col-row-rd.shader_test<br>
@@ -39,7 +39,6 @@ ortho<br>
<br>
uniform mat2x2 m[0] 1.0 2.0 3.0 4.0<br>
uniform mat2x2 m[1] 5.0 6.0 7.0 8.0<br>
-uniform mat2x2 m[2] 9.0 10.0 11.0 12.0<br>
uniform int col 0<br>
uniform int row 0<br>
uniform float expect 5<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-rd.shader_test<br>
index cfef3fd..561dbe8 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-rd.shader_test<br>
@@ -35,7 +35,6 @@ ortho<br>
<br>
uniform mat2x2 m[0] 1.0 2.0 3.0 4.0<br>
uniform mat2x2 m[1] 5.0 6.0 7.0 8.0<br>
-uniform mat2x2 m[2] 9.0 10.0 11.0 12.0<br>
uniform vec2 expect 7 8<br>
draw rect 60 5 10 10<br>
probe rgb 65 10 0.0 1.0 0.0<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-row-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-row-rd.shader_test<br>
index 6f7c533..22f7002 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-row-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat2-row-rd.shader_test<br>
@@ -37,7 +37,6 @@ ortho<br>
<br>
uniform mat2x2 m[0] 1.0 2.0 3.0 4.0<br>
uniform mat2x2 m[1] 5.0 6.0 7.0 8.0<br>
-uniform mat2x2 m[2] 9.0 10.0 11.0 12.0<br>
uniform int row 0<br>
uniform float expect 7<br>
draw rect 60 5 10 10<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-col-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-col-rd.shader_test<br>
index a32d6e5..3d6664e 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-col-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-col-rd.shader_test<br>
@@ -37,7 +37,6 @@ ortho<br>
<br>
uniform mat3x3 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0<br>
uniform mat3x3 m[1] 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0<br>
-uniform mat3x3 m[2] 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0<br>
uniform int col 0<br>
uniform vec3 expect 10 11 12<br>
draw rect 60 5 10 10<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-col-row-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-col-row-rd.shader_test<br>
index ca98fdd..b2bde47 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-col-row-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-col-row-rd.shader_test<br>
@@ -39,7 +39,6 @@ ortho<br>
<br>
uniform mat3x3 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0<br>
uniform mat3x3 m[1] 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0<br>
-uniform mat3x3 m[2] 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0<br>
uniform int col 0<br>
uniform int row 0<br>
uniform float expect 10<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-rd.shader_test<br>
index f47e412..ab4bcd7 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-rd.shader_test<br>
@@ -35,7 +35,6 @@ ortho<br>
<br>
uniform mat3x3 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0<br>
uniform mat3x3 m[1] 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0<br>
-uniform mat3x3 m[2] 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0<br>
uniform vec3 expect 13 14 15<br>
draw rect 75 5 10 10<br>
probe rgb 80 10 0.0 1.0 0.0<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-row-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-row-rd.shader_test<br>
index 3111795..c0af950 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-row-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat3-row-rd.shader_test<br>
@@ -37,7 +37,6 @@ ortho<br>
<br>
uniform mat3x3 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0<br>
uniform mat3x3 m[1] 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0<br>
-uniform mat3x3 m[2] 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0<br>
uniform int row 0<br>
uniform float expect 13<br>
draw rect 75 5 10 10<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-col-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-col-rd.shader_test<br>
index ecae6a4..b69b344 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-col-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-col-rd.shader_test<br>
@@ -37,7 +37,6 @@ ortho<br>
<br>
uniform mat4x4 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0<br>
uniform mat4x4 m[1] 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 31.0 32.0<br>
-uniform mat4x4 m[2] 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0 42.0 43.0 44.0 45.0 46.0 47.0 48.0<br>
uniform int col 0<br>
uniform vec4 expect 17 18 19 20<br>
draw rect 75 5 10 10<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-col-row-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-col-row-rd.shader_test<br>
index 8cb5971..be2ddc8 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-col-row-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-col-row-rd.shader_test<br>
@@ -39,7 +39,6 @@ ortho<br>
<br>
uniform mat4x4 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0<br>
uniform mat4x4 m[1] 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 31.0 32.0<br>
-uniform mat4x4 m[2] 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0 42.0 43.0 44.0 45.0 46.0 47.0 48.0<br>
uniform int col 0<br>
uniform int row 0<br>
uniform float expect 17<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-rd.shader_test<br>
index 20664b1..6020714 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-rd.shader_test<br>
@@ -35,7 +35,6 @@ ortho<br>
<br>
uniform mat4x4 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0<br>
uniform mat4x4 m[1] 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 31.0 32.0<br>
-uniform mat4x4 m[2] 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0 42.0 43.0 44.0 45.0 46.0 47.0 48.0<br>
uniform vec4 expect 21 22 23 24<br>
draw rect 90 5 10 10<br>
probe rgb 95 10 0.0 1.0 0.0<br>
diff --git a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-row-rd.shader_test b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-row-rd.shader_test<br>
index d089262..17487b9 100644<br>
--- a/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-row-rd.shader_test<br>
+++ b/tests/spec/glsl-1.10/execution/variable-indexing/vs-uniform-array-mat4-row-rd.shader_test<br>
@@ -37,7 +37,6 @@ ortho<br>
<br>
uniform mat4x4 m[0] 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0<br>
uniform mat4x4 m[1] 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 31.0 32.0<br>
-uniform mat4x4 m[2] 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0 42.0 43.0 44.0 45.0 46.0 47.0 48.0<br>
uniform int row 0<br>
uniform float expect 21<br>
draw rect 90 5 10 10<br>
diff --git a/tests/spec/glsl-1.10/variable-index-read.sh b/tests/spec/glsl-1.10/variable-index-read.sh<br>
index 4dc6b8d..b9f342e 100755<br>
--- a/tests/spec/glsl-1.10/variable-index-read.sh<br>
+++ b/tests/spec/glsl-1.10/variable-index-read.sh<br>
@@ -272,12 +272,19 @@ EOF<br>
function emit_test_vectors<br>
{<br>
matrix_dim=$1<br>
- array_dim=$2<br>
+ local array_dim=$2<br>
mode=$3<br>
index_value=$4<br>
col=$5<br>
expect_type=$6<br>
<br>
+ # Optimizing GLSL linkers may reduce the size of the uniform array if tail<br>
+ # elements are not accessed. Shader runner will fail the test if one of<br>
+ # the set uniforms doesn't have a location.<br>
+ if [ "x$mode" = "xuniform" -a $v -le 110 -a $array_dim -ne 0 -a "x$index_value" != "xindex" ]; then<br>
+ array_dim=$((index_value+1))<br>
+ fi<br>
+<br>
cat <<EOF<br>
[test]<br>
clear color 0.5 0.5 0.5 0.5<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.6.4<br></font></span></blockquote><div><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br></div></div>