summaryrefslogtreecommitdiff
path: root/tests/spec/glsl-1.50
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2015-03-19 15:08:13 +0100
committerMarek Olšák <marek.olsak@amd.com>2015-05-05 00:51:47 +0200
commit11ef578202ea35805ad3c98a78577424d80468ab (patch)
tree110a78baed1aac1bbf37a6070d3acd6f57da022f /tests/spec/glsl-1.50
parent086a2d6f9bea79764259dcb921edee6c165b9a2b (diff)
glsl-1.50: add tests for indirect addressing of VS outputs before GS (v2)
v2: - use length() - update the require section Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Diffstat (limited to 'tests/spec/glsl-1.50')
-rw-r--r--tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-float-index-wr-before-gs.shader_test202
-rw-r--r--tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-vec2-index-wr-before-gs.shader_test202
-rw-r--r--tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-vec3-index-wr-before-gs.shader_test202
-rw-r--r--tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-vec4-index-wr-before-gs.shader_test202
4 files changed, 808 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-float-index-wr-before-gs.shader_test b/tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-float-index-wr-before-gs.shader_test
new file mode 100644
index 000000000..2d305044f
--- /dev/null
+++ b/tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-float-index-wr-before-gs.shader_test
@@ -0,0 +1,202 @@
+[require]
+GLSL >= 1.50
+GL_MAX_VERTEX_OUTPUT_COMPONENTS >= 128
+
+[vertex shader]
+#version 150
+
+uniform int index;
+in vec4 piglit_vertex;
+
+out block {
+ float m1[16];
+ float m2[15];
+} ins;
+
+void main()
+{
+ gl_Position = piglit_vertex;
+
+ for (int i = 0; i < ins.m1.length(); i++)
+ ins.m1[i] = 1.0 + float(i);
+
+ for (int i = 0; i < ins.m2.length(); i++)
+ ins.m2[i] = 1.0 + float(ins.m1.length()+i);
+
+ if (index >= ins.m1.length())
+ ins.m2[index-ins.m1.length()] = 0.0;
+ else
+ ins.m1[index] = 0.0;
+}
+
+[geometry shader]
+#version 150
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+uniform int index;
+in block {
+ float m1[16];
+ float m2[15];
+} ins[];
+out vec4 color;
+
+void main()
+{
+ for (int p = 0; p < 3; p++) {
+ bool pass = true;
+
+ for (int i = 0; i < ins[p].m1.length(); i++)
+ pass = pass && ins[p].m1[i] == (index == i ?
+ 0.0 :
+ 1.0 + float(i));
+
+ for (int i = 0; i < ins[p].m2.length(); i++)
+ pass = pass && ins[p].m2[i] == (index == ins[p].m1.length()+i ?
+ 0.0 :
+ 17.0 + float(i));
+
+ color = pass ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
+
+ gl_Position = gl_in[p].gl_Position;
+ EmitVertex();
+ }
+}
+
+[fragment shader]
+#version 150
+in vec4 color;
+out vec4 outcolor;
+
+void main()
+{
+ outcolor = color;
+}
+
+[test]
+clear color 0.5 0.5 0.5 0.5
+clear
+
+uniform int index 0
+draw rect -1 -1 0.09 0.09
+probe rgb 6 6 0.0 1.0 0.0
+
+uniform int index 1
+draw rect -0.9 -1 0.09 0.09
+probe rgb 18 6 0.0 1.0 0.0
+
+uniform int index 2
+draw rect -0.8 -1 0.09 0.09
+probe rgb 31 6 0.0 1.0 0.0
+
+uniform int index 3
+draw rect -0.7 -1 0.09 0.09
+probe rgb 43 6 0.0 1.0 0.0
+
+uniform int index 4
+draw rect -0.6 -1 0.09 0.09
+probe rgb 56 6 0.0 1.0 0.0
+
+uniform int index 5
+draw rect -0.5 -1 0.09 0.09
+probe rgb 68 6 0.0 1.0 0.0
+
+uniform int index 6
+draw rect -0.4 -1 0.09 0.09
+probe rgb 81 6 0.0 1.0 0.0
+
+uniform int index 7
+draw rect -0.3 -1 0.09 0.09
+probe rgb 93 6 0.0 1.0 0.0
+
+uniform int index 8
+draw rect -0.2 -1 0.09 0.09
+probe rgb 106 6 0.0 1.0 0.0
+
+uniform int index 9
+draw rect -0.1 -1 0.09 0.09
+probe rgb 118 6 0.0 1.0 0.0
+
+uniform int index 10
+draw rect 0 -1 0.09 0.09
+probe rgb 131 6 0.0 1.0 0.0
+
+uniform int index 11
+draw rect 0.1 -1 0.09 0.09
+probe rgb 143 6 0.0 1.0 0.0
+
+uniform int index 12
+draw rect 0.2 -1 0.09 0.09
+probe rgb 156 6 0.0 1.0 0.0
+
+uniform int index 13
+draw rect 0.3 -1 0.09 0.09
+probe rgb 168 6 0.0 1.0 0.0
+
+uniform int index 14
+draw rect 0.4 -1 0.09 0.09
+probe rgb 181 6 0.0 1.0 0.0
+
+uniform int index 15
+draw rect 0.5 -1.0 0.09 0.09
+probe rgb 193 6 0.0 1.0 0.0
+
+uniform int index 16
+draw rect -1 -0.9 0.09 0.09
+probe rgb 6 18 0.0 1.0 0.0
+
+uniform int index 17
+draw rect -0.9 -0.9 0.09 0.09
+probe rgb 18 18 0.0 1.0 0.0
+
+uniform int index 18
+draw rect -0.8 -0.9 0.09 0.09
+probe rgb 31 18 0.0 1.0 0.0
+
+uniform int index 19
+draw rect -0.7 -0.9 0.09 0.09
+probe rgb 43 18 0.0 1.0 0.0
+
+uniform int index 20
+draw rect -0.6 -0.9 0.09 0.09
+probe rgb 56 18 0.0 1.0 0.0
+
+uniform int index 21
+draw rect -0.5 -0.9 0.09 0.09
+probe rgb 68 18 0.0 1.0 0.0
+
+uniform int index 22
+draw rect -0.4 -0.9 0.09 0.09
+probe rgb 81 18 0.0 1.0 0.0
+
+uniform int index 23
+draw rect -0.3 -0.9 0.09 0.09
+probe rgb 93 18 0.0 1.0 0.0
+
+uniform int index 24
+draw rect -0.2 -0.9 0.09 0.09
+probe rgb 106 18 0.0 1.0 0.0
+
+uniform int index 25
+draw rect -0.1 -0.9 0.09 0.09
+probe rgb 118 18 0.0 1.0 0.0
+
+uniform int index 26
+draw rect 0 -0.9 0.09 0.09
+probe rgb 131 18 0.0 1.0 0.0
+
+uniform int index 27
+draw rect 0.1 -0.9 0.09 0.09
+probe rgb 143 18 0.0 1.0 0.0
+
+uniform int index 28
+draw rect 0.2 -0.9 0.09 0.09
+probe rgb 156 18 0.0 1.0 0.0
+
+uniform int index 29
+draw rect 0.3 -0.9 0.09 0.09
+probe rgb 168 18 0.0 1.0 0.0
+
+uniform int index 30
+draw rect 0.4 -0.9 0.09 0.09
+probe rgb 181 18 0.0 1.0 0.0
diff --git a/tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-vec2-index-wr-before-gs.shader_test b/tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-vec2-index-wr-before-gs.shader_test
new file mode 100644
index 000000000..d347c2c32
--- /dev/null
+++ b/tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-vec2-index-wr-before-gs.shader_test
@@ -0,0 +1,202 @@
+[require]
+GLSL >= 1.50
+GL_MAX_VERTEX_OUTPUT_COMPONENTS >= 128
+
+[vertex shader]
+#version 150
+
+uniform int index;
+in vec4 piglit_vertex;
+
+out block {
+ vec2 m1[16];
+ vec2 m2[15];
+} ins;
+
+void main()
+{
+ gl_Position = piglit_vertex;
+
+ for (int i = 0; i < ins.m1.length(); i++)
+ ins.m1[i] = vec2(1.0, 1.1) + vec2(i);
+
+ for (int i = 0; i < ins.m2.length(); i++)
+ ins.m2[i] = vec2(1.0, 1.1) + vec2(ins.m1.length()+i);
+
+ if (index >= ins.m1.length())
+ ins.m2[index-ins.m1.length()] = vec2(0.0, 0.1);
+ else
+ ins.m1[index] = vec2(0.0, 0.1);
+}
+
+[geometry shader]
+#version 150
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+uniform int index;
+in block {
+ vec2 m1[16];
+ vec2 m2[15];
+} ins[];
+out vec4 color;
+
+void main()
+{
+ for (int p = 0; p < 3; p++) {
+ bool pass = true;
+
+ for (int i = 0; i < ins[p].m1.length(); i++)
+ pass = pass && ins[p].m1[i] == (index == i ?
+ vec2(0.0, 0.1) :
+ vec2(1.0, 1.1) + vec2(i));
+
+ for (int i = 0; i < ins[p].m2.length(); i++)
+ pass = pass && ins[p].m2[i] == (index == ins[p].m1.length()+i ?
+ vec2(0.0, 0.1) :
+ vec2(17.0, 17.1) + vec2(i));
+
+ color = pass ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
+
+ gl_Position = gl_in[p].gl_Position;
+ EmitVertex();
+ }
+}
+
+[fragment shader]
+#version 150
+in vec4 color;
+out vec4 outcolor;
+
+void main()
+{
+ outcolor = color;
+}
+
+[test]
+clear color 0.5 0.5 0.5 0.5
+clear
+
+uniform int index 0
+draw rect -1 -1 0.09 0.09
+probe rgb 6 6 0.0 1.0 0.0
+
+uniform int index 1
+draw rect -0.9 -1 0.09 0.09
+probe rgb 18 6 0.0 1.0 0.0
+
+uniform int index 2
+draw rect -0.8 -1 0.09 0.09
+probe rgb 31 6 0.0 1.0 0.0
+
+uniform int index 3
+draw rect -0.7 -1 0.09 0.09
+probe rgb 43 6 0.0 1.0 0.0
+
+uniform int index 4
+draw rect -0.6 -1 0.09 0.09
+probe rgb 56 6 0.0 1.0 0.0
+
+uniform int index 5
+draw rect -0.5 -1 0.09 0.09
+probe rgb 68 6 0.0 1.0 0.0
+
+uniform int index 6
+draw rect -0.4 -1 0.09 0.09
+probe rgb 81 6 0.0 1.0 0.0
+
+uniform int index 7
+draw rect -0.3 -1 0.09 0.09
+probe rgb 93 6 0.0 1.0 0.0
+
+uniform int index 8
+draw rect -0.2 -1 0.09 0.09
+probe rgb 106 6 0.0 1.0 0.0
+
+uniform int index 9
+draw rect -0.1 -1 0.09 0.09
+probe rgb 118 6 0.0 1.0 0.0
+
+uniform int index 10
+draw rect 0 -1 0.09 0.09
+probe rgb 131 6 0.0 1.0 0.0
+
+uniform int index 11
+draw rect 0.1 -1 0.09 0.09
+probe rgb 143 6 0.0 1.0 0.0
+
+uniform int index 12
+draw rect 0.2 -1 0.09 0.09
+probe rgb 156 6 0.0 1.0 0.0
+
+uniform int index 13
+draw rect 0.3 -1 0.09 0.09
+probe rgb 168 6 0.0 1.0 0.0
+
+uniform int index 14
+draw rect 0.4 -1 0.09 0.09
+probe rgb 181 6 0.0 1.0 0.0
+
+uniform int index 15
+draw rect 0.5 -1.0 0.09 0.09
+probe rgb 193 6 0.0 1.0 0.0
+
+uniform int index 16
+draw rect -1 -0.9 0.09 0.09
+probe rgb 6 18 0.0 1.0 0.0
+
+uniform int index 17
+draw rect -0.9 -0.9 0.09 0.09
+probe rgb 18 18 0.0 1.0 0.0
+
+uniform int index 18
+draw rect -0.8 -0.9 0.09 0.09
+probe rgb 31 18 0.0 1.0 0.0
+
+uniform int index 19
+draw rect -0.7 -0.9 0.09 0.09
+probe rgb 43 18 0.0 1.0 0.0
+
+uniform int index 20
+draw rect -0.6 -0.9 0.09 0.09
+probe rgb 56 18 0.0 1.0 0.0
+
+uniform int index 21
+draw rect -0.5 -0.9 0.09 0.09
+probe rgb 68 18 0.0 1.0 0.0
+
+uniform int index 22
+draw rect -0.4 -0.9 0.09 0.09
+probe rgb 81 18 0.0 1.0 0.0
+
+uniform int index 23
+draw rect -0.3 -0.9 0.09 0.09
+probe rgb 93 18 0.0 1.0 0.0
+
+uniform int index 24
+draw rect -0.2 -0.9 0.09 0.09
+probe rgb 106 18 0.0 1.0 0.0
+
+uniform int index 25
+draw rect -0.1 -0.9 0.09 0.09
+probe rgb 118 18 0.0 1.0 0.0
+
+uniform int index 26
+draw rect 0 -0.9 0.09 0.09
+probe rgb 131 18 0.0 1.0 0.0
+
+uniform int index 27
+draw rect 0.1 -0.9 0.09 0.09
+probe rgb 143 18 0.0 1.0 0.0
+
+uniform int index 28
+draw rect 0.2 -0.9 0.09 0.09
+probe rgb 156 18 0.0 1.0 0.0
+
+uniform int index 29
+draw rect 0.3 -0.9 0.09 0.09
+probe rgb 168 18 0.0 1.0 0.0
+
+uniform int index 30
+draw rect 0.4 -0.9 0.09 0.09
+probe rgb 181 18 0.0 1.0 0.0
diff --git a/tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-vec3-index-wr-before-gs.shader_test b/tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-vec3-index-wr-before-gs.shader_test
new file mode 100644
index 000000000..ea83d9329
--- /dev/null
+++ b/tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-vec3-index-wr-before-gs.shader_test
@@ -0,0 +1,202 @@
+[require]
+GLSL >= 1.50
+GL_MAX_VERTEX_OUTPUT_COMPONENTS >= 128
+
+[vertex shader]
+#version 150
+
+uniform int index;
+in vec4 piglit_vertex;
+
+out block {
+ vec3 m1[16];
+ vec3 m2[15];
+} ins;
+
+void main()
+{
+ gl_Position = piglit_vertex;
+
+ for (int i = 0; i < ins.m1.length(); i++)
+ ins.m1[i] = vec3(1.0, 1.1, 1.2) + vec3(i);
+
+ for (int i = 0; i < ins.m2.length(); i++)
+ ins.m2[i] = vec3(1.0, 1.1, 1.2) + vec3(ins.m1.length()+i);
+
+ if (index >= ins.m1.length())
+ ins.m2[index-ins.m1.length()] = vec3(0.0, 0.1, 0.2);
+ else
+ ins.m1[index] = vec3(0.0, 0.1, 0.2);
+}
+
+[geometry shader]
+#version 150
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+uniform int index;
+in block {
+ vec3 m1[16];
+ vec3 m2[15];
+} ins[];
+out vec4 color;
+
+void main()
+{
+ for (int p = 0; p < 3; p++) {
+ bool pass = true;
+
+ for (int i = 0; i < ins[p].m1.length(); i++)
+ pass = pass && ins[p].m1[i] == (index == i ?
+ vec3(0.0, 0.1, 0.2) :
+ vec3(1.0, 1.1, 1.2) + vec3(i));
+
+ for (int i = 0; i < ins[p].m2.length(); i++)
+ pass = pass && ins[p].m2[i] == (index == ins[p].m1.length()+i ?
+ vec3(0.0, 0.1, 0.2) :
+ vec3(17.0, 17.1, 17.2) + vec3(i));
+
+ color = pass ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
+
+ gl_Position = gl_in[p].gl_Position;
+ EmitVertex();
+ }
+}
+
+[fragment shader]
+#version 150
+in vec4 color;
+out vec4 outcolor;
+
+void main()
+{
+ outcolor = color;
+}
+
+[test]
+clear color 0.5 0.5 0.5 0.5
+clear
+
+uniform int index 0
+draw rect -1 -1 0.09 0.09
+probe rgb 6 6 0.0 1.0 0.0
+
+uniform int index 1
+draw rect -0.9 -1 0.09 0.09
+probe rgb 18 6 0.0 1.0 0.0
+
+uniform int index 2
+draw rect -0.8 -1 0.09 0.09
+probe rgb 31 6 0.0 1.0 0.0
+
+uniform int index 3
+draw rect -0.7 -1 0.09 0.09
+probe rgb 43 6 0.0 1.0 0.0
+
+uniform int index 4
+draw rect -0.6 -1 0.09 0.09
+probe rgb 56 6 0.0 1.0 0.0
+
+uniform int index 5
+draw rect -0.5 -1 0.09 0.09
+probe rgb 68 6 0.0 1.0 0.0
+
+uniform int index 6
+draw rect -0.4 -1 0.09 0.09
+probe rgb 81 6 0.0 1.0 0.0
+
+uniform int index 7
+draw rect -0.3 -1 0.09 0.09
+probe rgb 93 6 0.0 1.0 0.0
+
+uniform int index 8
+draw rect -0.2 -1 0.09 0.09
+probe rgb 106 6 0.0 1.0 0.0
+
+uniform int index 9
+draw rect -0.1 -1 0.09 0.09
+probe rgb 118 6 0.0 1.0 0.0
+
+uniform int index 10
+draw rect 0 -1 0.09 0.09
+probe rgb 131 6 0.0 1.0 0.0
+
+uniform int index 11
+draw rect 0.1 -1 0.09 0.09
+probe rgb 143 6 0.0 1.0 0.0
+
+uniform int index 12
+draw rect 0.2 -1 0.09 0.09
+probe rgb 156 6 0.0 1.0 0.0
+
+uniform int index 13
+draw rect 0.3 -1 0.09 0.09
+probe rgb 168 6 0.0 1.0 0.0
+
+uniform int index 14
+draw rect 0.4 -1 0.09 0.09
+probe rgb 181 6 0.0 1.0 0.0
+
+uniform int index 15
+draw rect 0.5 -1.0 0.09 0.09
+probe rgb 193 6 0.0 1.0 0.0
+
+uniform int index 16
+draw rect -1 -0.9 0.09 0.09
+probe rgb 6 18 0.0 1.0 0.0
+
+uniform int index 17
+draw rect -0.9 -0.9 0.09 0.09
+probe rgb 18 18 0.0 1.0 0.0
+
+uniform int index 18
+draw rect -0.8 -0.9 0.09 0.09
+probe rgb 31 18 0.0 1.0 0.0
+
+uniform int index 19
+draw rect -0.7 -0.9 0.09 0.09
+probe rgb 43 18 0.0 1.0 0.0
+
+uniform int index 20
+draw rect -0.6 -0.9 0.09 0.09
+probe rgb 56 18 0.0 1.0 0.0
+
+uniform int index 21
+draw rect -0.5 -0.9 0.09 0.09
+probe rgb 68 18 0.0 1.0 0.0
+
+uniform int index 22
+draw rect -0.4 -0.9 0.09 0.09
+probe rgb 81 18 0.0 1.0 0.0
+
+uniform int index 23
+draw rect -0.3 -0.9 0.09 0.09
+probe rgb 93 18 0.0 1.0 0.0
+
+uniform int index 24
+draw rect -0.2 -0.9 0.09 0.09
+probe rgb 106 18 0.0 1.0 0.0
+
+uniform int index 25
+draw rect -0.1 -0.9 0.09 0.09
+probe rgb 118 18 0.0 1.0 0.0
+
+uniform int index 26
+draw rect 0 -0.9 0.09 0.09
+probe rgb 131 18 0.0 1.0 0.0
+
+uniform int index 27
+draw rect 0.1 -0.9 0.09 0.09
+probe rgb 143 18 0.0 1.0 0.0
+
+uniform int index 28
+draw rect 0.2 -0.9 0.09 0.09
+probe rgb 156 18 0.0 1.0 0.0
+
+uniform int index 29
+draw rect 0.3 -0.9 0.09 0.09
+probe rgb 168 18 0.0 1.0 0.0
+
+uniform int index 30
+draw rect 0.4 -0.9 0.09 0.09
+probe rgb 181 18 0.0 1.0 0.0
diff --git a/tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-vec4-index-wr-before-gs.shader_test b/tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-vec4-index-wr-before-gs.shader_test
new file mode 100644
index 000000000..a0643b9e6
--- /dev/null
+++ b/tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-vec4-index-wr-before-gs.shader_test
@@ -0,0 +1,202 @@
+[require]
+GLSL >= 1.50
+GL_MAX_VERTEX_OUTPUT_COMPONENTS >= 128
+
+[vertex shader]
+#version 150
+
+uniform int index;
+in vec4 piglit_vertex;
+
+out block {
+ vec4 m1[16];
+ vec4 m2[15];
+} ins;
+
+void main()
+{
+ gl_Position = piglit_vertex;
+
+ for (int i = 0; i < ins.m1.length(); i++)
+ ins.m1[i] = vec4(1.0, 1.1, 1.2, 1.3) + vec4(i);
+
+ for (int i = 0; i < ins.m2.length(); i++)
+ ins.m2[i] = vec4(1.0, 1.1, 1.2, 1.3) + vec4(ins.m1.length()+i);
+
+ if (index >= ins.m1.length())
+ ins.m2[index-ins.m1.length()] = vec4(0.0, 0.1, 0.2, 0.3);
+ else
+ ins.m1[index] = vec4(0.0, 0.1, 0.2, 0.3);
+}
+
+[geometry shader]
+#version 150
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+uniform int index;
+in block {
+ vec4 m1[16];
+ vec4 m2[15];
+} ins[];
+out vec4 color;
+
+void main()
+{
+ for (int p = 0; p < 3; p++) {
+ bool pass = true;
+
+ for (int i = 0; i < ins[p].m1.length(); i++)
+ pass = pass && ins[p].m1[i] == (index == i ?
+ vec4(0.0, 0.1, 0.2, 0.3) :
+ vec4(1.0, 1.1, 1.2, 1.3) + vec4(i));
+
+ for (int i = 0; i < ins[p].m2.length(); i++)
+ pass = pass && ins[p].m2[i] == (index == ins[p].m1.length()+i ?
+ vec4(0.0, 0.1, 0.2, 0.3) :
+ vec4(17.0, 17.1, 17.2, 17.3) + vec4(i));
+
+ color = pass ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
+
+ gl_Position = gl_in[p].gl_Position;
+ EmitVertex();
+ }
+}
+
+[fragment shader]
+#version 150
+in vec4 color;
+out vec4 outcolor;
+
+void main()
+{
+ outcolor = color;
+}
+
+[test]
+clear color 0.5 0.5 0.5 0.5
+clear
+
+uniform int index 0
+draw rect -1 -1 0.09 0.09
+probe rgb 6 6 0.0 1.0 0.0
+
+uniform int index 1
+draw rect -0.9 -1 0.09 0.09
+probe rgb 18 6 0.0 1.0 0.0
+
+uniform int index 2
+draw rect -0.8 -1 0.09 0.09
+probe rgb 31 6 0.0 1.0 0.0
+
+uniform int index 3
+draw rect -0.7 -1 0.09 0.09
+probe rgb 43 6 0.0 1.0 0.0
+
+uniform int index 4
+draw rect -0.6 -1 0.09 0.09
+probe rgb 56 6 0.0 1.0 0.0
+
+uniform int index 5
+draw rect -0.5 -1 0.09 0.09
+probe rgb 68 6 0.0 1.0 0.0
+
+uniform int index 6
+draw rect -0.4 -1 0.09 0.09
+probe rgb 81 6 0.0 1.0 0.0
+
+uniform int index 7
+draw rect -0.3 -1 0.09 0.09
+probe rgb 93 6 0.0 1.0 0.0
+
+uniform int index 8
+draw rect -0.2 -1 0.09 0.09
+probe rgb 106 6 0.0 1.0 0.0
+
+uniform int index 9
+draw rect -0.1 -1 0.09 0.09
+probe rgb 118 6 0.0 1.0 0.0
+
+uniform int index 10
+draw rect 0 -1 0.09 0.09
+probe rgb 131 6 0.0 1.0 0.0
+
+uniform int index 11
+draw rect 0.1 -1 0.09 0.09
+probe rgb 143 6 0.0 1.0 0.0
+
+uniform int index 12
+draw rect 0.2 -1 0.09 0.09
+probe rgb 156 6 0.0 1.0 0.0
+
+uniform int index 13
+draw rect 0.3 -1 0.09 0.09
+probe rgb 168 6 0.0 1.0 0.0
+
+uniform int index 14
+draw rect 0.4 -1 0.09 0.09
+probe rgb 181 6 0.0 1.0 0.0
+
+uniform int index 15
+draw rect 0.5 -1.0 0.09 0.09
+probe rgb 193 6 0.0 1.0 0.0
+
+uniform int index 16
+draw rect -1 -0.9 0.09 0.09
+probe rgb 6 18 0.0 1.0 0.0
+
+uniform int index 17
+draw rect -0.9 -0.9 0.09 0.09
+probe rgb 18 18 0.0 1.0 0.0
+
+uniform int index 18
+draw rect -0.8 -0.9 0.09 0.09
+probe rgb 31 18 0.0 1.0 0.0
+
+uniform int index 19
+draw rect -0.7 -0.9 0.09 0.09
+probe rgb 43 18 0.0 1.0 0.0
+
+uniform int index 20
+draw rect -0.6 -0.9 0.09 0.09
+probe rgb 56 18 0.0 1.0 0.0
+
+uniform int index 21
+draw rect -0.5 -0.9 0.09 0.09
+probe rgb 68 18 0.0 1.0 0.0
+
+uniform int index 22
+draw rect -0.4 -0.9 0.09 0.09
+probe rgb 81 18 0.0 1.0 0.0
+
+uniform int index 23
+draw rect -0.3 -0.9 0.09 0.09
+probe rgb 93 18 0.0 1.0 0.0
+
+uniform int index 24
+draw rect -0.2 -0.9 0.09 0.09
+probe rgb 106 18 0.0 1.0 0.0
+
+uniform int index 25
+draw rect -0.1 -0.9 0.09 0.09
+probe rgb 118 18 0.0 1.0 0.0
+
+uniform int index 26
+draw rect 0 -0.9 0.09 0.09
+probe rgb 131 18 0.0 1.0 0.0
+
+uniform int index 27
+draw rect 0.1 -0.9 0.09 0.09
+probe rgb 143 18 0.0 1.0 0.0
+
+uniform int index 28
+draw rect 0.2 -0.9 0.09 0.09
+probe rgb 156 18 0.0 1.0 0.0
+
+uniform int index 29
+draw rect 0.3 -0.9 0.09 0.09
+probe rgb 168 18 0.0 1.0 0.0
+
+uniform int index 30
+draw rect 0.4 -0.9 0.09 0.09
+probe rgb 181 18 0.0 1.0 0.0