4.30 removes gl_FragColor. In debugging bug 96320, I found it useful to
replace gl_FragColor with a user-defined varying so that the tests could
be run under GLSL 4.30.
---
 .../execution/aggregate-dynamic-initializer-matrix.shader_test      | 3 ++-
 .../execution/aggregate-dynamic-initializer-sized-array.shader_test | 3 ++-
 .../execution/aggregate-dynamic-initializer-struct.shader_test      | 3 ++-
 .../aggregate-dynamic-initializer-unsized-array.shader_test         | 3 ++-
 .../execution/aggregate-initializer-matrix.shader_test              | 3 ++-
 .../execution/aggregate-initializer-sized-array.shader_test         | 3 ++-
 .../execution/aggregate-initializer-struct.shader_test              | 3 ++-
 .../execution/aggregate-initializer-unsized-array.shader_test       | 3 ++-
 .../execution/const-var-non-constant-expr.shader_test               | 3 ++-
 .../execution/implicit-return-type-conversion.shader_test           | 4 +++-
 .../execution/length-matrix.shader_test                             | 6 ++++--
 .../execution/length-vector.shader_test                             | 6 ++++--
 .../execution/scalar-swizzle.shader_test                            | 4 +++-
 13 files changed, 32 insertions(+), 15 deletions(-)

diff --git 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-matrix.shader_test
 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-matrix.shader_test
index 7b923e8..478767e 100644
--- 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-matrix.shader_test
+++ 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-matrix.shader_test
@@ -44,9 +44,10 @@ void main()
 
 [fragment shader]
 in vec4 color;
+out vec4 frag_color;
 
 void main() {
-    gl_FragColor = color;;
+    frag_color = color;
 }
 
 [test]
diff --git 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-sized-array.shader_test
 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-sized-array.shader_test
index 8191ceb..deb9bbd 100644
--- 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-sized-array.shader_test
+++ 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-sized-array.shader_test
@@ -51,9 +51,10 @@ void main()
 
 [fragment shader]
 in vec4 color;
+out vec4 frag_color;
 
 void main() {
-    gl_FragColor = color;;
+    frag_color = color;
 }
 
 [test]
diff --git 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-struct.shader_test
 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-struct.shader_test
index a04a2fa..0fce9c6 100644
--- 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-struct.shader_test
+++ 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-struct.shader_test
@@ -73,9 +73,10 @@ void main()
 
 [fragment shader]
 in vec4 color;
+out vec4 frag_color;
 
 void main() {
-    gl_FragColor = color;;
+    frag_color = color;
 }
 
 [test]
diff --git 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-unsized-array.shader_test
 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-unsized-array.shader_test
index 5300f49..8f6d5c1 100644
--- 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-unsized-array.shader_test
+++ 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-unsized-array.shader_test
@@ -53,9 +53,10 @@ void main()
 
 [fragment shader]
 in vec4 color;
+out vec4 frag_color;
 
 void main() {
-    gl_FragColor = color;;
+    frag_color = color;
 }
 
 [test]
diff --git 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test
 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test
index f5da4c9..bb6a543 100644
--- 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test
+++ 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test
@@ -39,9 +39,10 @@ void main()
 
 [fragment shader]
 in vec4 color;
+out vec4 frag_color;
 
 void main() {
-    gl_FragColor = color;;
+    frag_color = color;
 }
 
 [test]
diff --git 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test
 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test
index 5ac422d..df28262 100644
--- 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test
+++ 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test
@@ -47,9 +47,10 @@ void main()
 
 [fragment shader]
 in vec4 color;
+out vec4 frag_color;
 
 void main() {
-    gl_FragColor = color;;
+    frag_color = color;
 }
 
 [test]
diff --git 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-struct.shader_test
 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-struct.shader_test
index e11681e..47d7691 100644
--- 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-struct.shader_test
+++ 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-struct.shader_test
@@ -66,9 +66,10 @@ void main()
 
 [fragment shader]
 in vec4 color;
+out vec4 frag_color;
 
 void main() {
-    gl_FragColor = color;;
+    frag_color = color;
 }
 
 [test]
diff --git 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-unsized-array.shader_test
 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-unsized-array.shader_test
index 369ed8c..794bdeb 100644
--- 
a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-unsized-array.shader_test
+++ 
b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-unsized-array.shader_test
@@ -49,9 +49,10 @@ void main()
 
 [fragment shader]
 in vec4 color;
+out vec4 frag_color;
 
 void main() {
-    gl_FragColor = color;;
+    frag_color = color;
 }
 
 [test]
diff --git 
a/tests/spec/arb_shading_language_420pack/execution/const-var-non-constant-expr.shader_test
 
b/tests/spec/arb_shading_language_420pack/execution/const-var-non-constant-expr.shader_test
index 2256f65..64b7e21 100644
--- 
a/tests/spec/arb_shading_language_420pack/execution/const-var-non-constant-expr.shader_test
+++ 
b/tests/spec/arb_shading_language_420pack/execution/const-var-non-constant-expr.shader_test
@@ -22,10 +22,11 @@ GL_ARB_shading_language_420pack
 #extension GL_ARB_shading_language_420pack: enable
 
 uniform vec4 color;
+out vec4 frag_color;
 
 void main() {
     const vec4 const_color = color + vec4(-1.0, 1.0, 0.0, 0.0);
-    gl_FragColor = const_color;
+    frag_color = const_color;
 }
 
 [test]
diff --git 
a/tests/spec/arb_shading_language_420pack/execution/implicit-return-type-conversion.shader_test
 
b/tests/spec/arb_shading_language_420pack/execution/implicit-return-type-conversion.shader_test
index 9c5ec4c..1a86fe0 100644
--- 
a/tests/spec/arb_shading_language_420pack/execution/implicit-return-type-conversion.shader_test
+++ 
b/tests/spec/arb_shading_language_420pack/execution/implicit-return-type-conversion.shader_test
@@ -18,10 +18,12 @@ GL_ARB_shading_language_420pack
 [fragment shader]
 #extension GL_ARB_shading_language_420pack: enable
 
+out vec4 frag_color;
+
 vec4 func() { return ivec4(1, 0, 0, 1); }
 
 void main() {
-    gl_FragColor = func();
+    frag_color = func();
 }
 
 [test]
diff --git 
a/tests/spec/arb_shading_language_420pack/execution/length-matrix.shader_test 
b/tests/spec/arb_shading_language_420pack/execution/length-matrix.shader_test
index 8df34e7..81d4bab 100644
--- 
a/tests/spec/arb_shading_language_420pack/execution/length-matrix.shader_test
+++ 
b/tests/spec/arb_shading_language_420pack/execution/length-matrix.shader_test
@@ -22,6 +22,8 @@ GL_ARB_shading_language_420pack
 [fragment shader]
 #extension GL_ARB_shading_language_420pack: enable
 
+out vec4 frag_color;
+
 void main() {
     mat2x2 m2x2;
     mat2x3 m2x3;
@@ -33,7 +35,7 @@ void main() {
     mat4x3 m4x3;
     mat4x4 m4x4;
 
-    gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+    frag_color = vec4(0.0, 1.0, 0.0, 1.0);
 
     if (m2x2.length() != 2 ||
         m2x3.length() != 2 ||
@@ -44,7 +46,7 @@ void main() {
         m4x2.length() != 4 ||
         m4x3.length() != 4 ||
         m4x4.length() != 4) {
-        gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+        frag_color = vec4(1.0, 0.0, 0.0, 1.0);
     }
 }
 
diff --git 
a/tests/spec/arb_shading_language_420pack/execution/length-vector.shader_test 
b/tests/spec/arb_shading_language_420pack/execution/length-vector.shader_test
index e5aa39b..e70a67e 100644
--- 
a/tests/spec/arb_shading_language_420pack/execution/length-vector.shader_test
+++ 
b/tests/spec/arb_shading_language_420pack/execution/length-vector.shader_test
@@ -22,17 +22,19 @@ GL_ARB_shading_language_420pack
 [fragment shader]
 #extension GL_ARB_shading_language_420pack: enable
 
+out vec4 frag_color;
+
 void main() {
     vec2 v2;
     vec3 v3;
     vec4 v4;
 
-    gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+    frag_color = vec4(0.0, 1.0, 0.0, 1.0);
 
     if (v2.length() != 2 ||
         v3.length() != 3 ||
         v4.length() != 4) {
-        gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+        frag_color = vec4(1.0, 0.0, 0.0, 1.0);
     }
 }
 
diff --git 
a/tests/spec/arb_shading_language_420pack/execution/scalar-swizzle.shader_test 
b/tests/spec/arb_shading_language_420pack/execution/scalar-swizzle.shader_test
index 11cdbc1..5643297 100644
--- 
a/tests/spec/arb_shading_language_420pack/execution/scalar-swizzle.shader_test
+++ 
b/tests/spec/arb_shading_language_420pack/execution/scalar-swizzle.shader_test
@@ -22,10 +22,12 @@ GL_ARB_shading_language_420pack
 [fragment shader]
 #extension GL_ARB_shading_language_420pack: enable
 
+out vec4 frag_color;
+
 void main() {
     float a = 1.0;
 
-    gl_FragColor = a.xxxx;
+    frag_color = a.xxxx;
 }
 
 [test]
-- 
2.7.3

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

Reply via email to