[Piglit] [PATCH 2/4] glsl-es-1.00: Fix really broken precision tests
Ian Romanick
idr at freedesktop.org
Fri Aug 9 15:40:07 PDT 2013
From: Ian Romanick <ian.d.romanick at intel.com>
Each of these tests contains a dummy function to work around issues with
some GLSL compilers (e.g., Apple). Each of these dummy functions looks
like:
float f() {
return 0.0;
}
Since most of the tests don't define a default precision for float,
*ALL* of the fragment shader tests should fail to compile. Oops. Work
around this by changing the dummy function to:
void f() { }
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Cc: Tom Gall <tom.gall at linaro.org>
---
.../compiler/precision-qualifiers/default-precision-bool-01.frag | 4 +---
.../compiler/precision-qualifiers/default-precision-float-01.frag | 4 +---
.../compiler/precision-qualifiers/default-precision-int-01.frag | 4 +---
.../compiler/precision-qualifiers/default-precision-vec-01.frag | 4 +---
.../glsl-es-1.00/compiler/precision-qualifiers/precision-bool-01.frag | 3 +--
.../glsl-es-1.00/compiler/precision-qualifiers/precision-bool-02.frag | 3 +--
.../compiler/precision-qualifiers/precision-float-01.frag | 3 +--
.../compiler/precision-qualifiers/precision-float-02.frag | 3 +--
.../compiler/precision-qualifiers/precision-float-03.frag | 4 +---
.../compiler/precision-qualifiers/precision-float-04.frag | 3 +--
.../compiler/precision-qualifiers/precision-fs-highp-01.frag | 4 +---
.../compiler/precision-qualifiers/precision-fs-highp-02.frag | 4 +---
.../compiler/precision-qualifiers/precision-function-param-01.frag | 4 +---
.../compiler/precision-qualifiers/precision-global-01.frag | 4 +---
.../glsl-es-1.00/compiler/precision-qualifiers/precision-int-01.frag | 3 +--
.../glsl-es-1.00/compiler/precision-qualifiers/precision-int-02.frag | 3 +--
.../glsl-es-1.00/compiler/precision-qualifiers/precision-int-03.frag | 4 +---
.../compiler/precision-qualifiers/precision-literal-const-01.frag | 3 +--
.../compiler/precision-qualifiers/precision-literal-const-02.frag | 3 +--
.../compiler/precision-qualifiers/precision-local-01.frag | 3 +--
.../compiler/precision-qualifiers/precision-struct-01.frag | 4 +---
.../compiler/precision-qualifiers/precision-struct-02.frag | 4 +---
.../compiler/precision-qualifiers/precision-vs-highp-01.vert | 4 +---
23 files changed, 23 insertions(+), 59 deletions(-)
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-bool-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-bool-01.frag
index 07b669f..ad934ac 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-bool-01.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-bool-01.frag
@@ -17,6 +17,4 @@
precision lowp bool;
-float f() {
- return 0.0;
-}
+void f() { }
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-float-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-float-01.frag
index 63b8756..8a270b2 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-float-01.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-float-01.frag
@@ -16,6 +16,4 @@
precision lowp float;
-float f() {
- return 0.0;
-}
+void f() { }
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-int-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-int-01.frag
index ecfd6e7..2d3ba21 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-int-01.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-int-01.frag
@@ -16,6 +16,4 @@
precision mediump int;
-float f() {
- return 0.0;
-}
+void f() { }
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-vec-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-vec-01.frag
index 777d069..86c9c17 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-vec-01.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-vec-01.frag
@@ -18,6 +18,4 @@
precision mediump vec2;
-float f() {
- return 0.0;
-}
+void f() { }
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-01.frag
index a350ae6..88855bd 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-01.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-01.frag
@@ -11,7 +11,6 @@
#version 100
-float f() {
+void f() {
lowp bool b;
- return 0.0;
}
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-02.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-02.frag
index 0251c78..1ba669a 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-02.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-02.frag
@@ -11,7 +11,6 @@
#version 130
-float f() {
+void f() {
lowp bvec2 v;
- return 0.0;
}
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-01.frag
index 9e122b8..be6bb98 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-01.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-01.frag
@@ -11,7 +11,6 @@
#version 100
-float f() {
+void f() {
mediump float x;
- return 0.0;
}
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-02.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-02.frag
index e84dba0..34033e3 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-02.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-02.frag
@@ -11,7 +11,6 @@
#version 100
-float f() {
+void f() {
lowp vec2 v;
- return 0.0;
}
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-03.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-03.frag
index d4878ed..2a9ceb2 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-03.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-03.frag
@@ -13,6 +13,4 @@
lowp float a[4];
-float f() {
- return 0.0;
-}
+void f() { }
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-04.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-04.frag
index b13877d..f568044 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-04.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-04.frag
@@ -11,7 +11,6 @@
#version 100
-float f() {
+void f() {
lowp mat4 m;
- return 0.0;
}
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-01.frag
index 7540d30..46a81b0 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-01.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-01.frag
@@ -19,6 +19,4 @@
highp float x;
#endif
-float f() {
- return 0.0;
-}
+void f() { }
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-02.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-02.frag
index a79d0f0..18bc6a1 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-02.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-02.frag
@@ -21,6 +21,4 @@ highp float x;
#error
#endif
-float f() {
- return 0.0;
-}
+void f() { }
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-function-param-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-function-param-01.frag
index 8ab6734..2e776a5 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-function-param-01.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-function-param-01.frag
@@ -11,6 +11,4 @@
#version 100
-lowp float f(lowp int x) {
- return 0.0;
-}
+void f(lowp int x) { }
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-global-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-global-01.frag
index 83e4ce9..ec61ac2 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-global-01.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-global-01.frag
@@ -14,6 +14,4 @@
uniform mediump float x;
varying lowp float y;
-float f() {
- return 0.0;
-}
+void f() { }
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-01.frag
index 061b365..84b0043 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-01.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-01.frag
@@ -11,7 +11,6 @@
#version 100
-float f() {
+void f() {
lowp int x;
- return 0.0;
}
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-02.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-02.frag
index 3572a4b..9fe1cf3 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-02.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-02.frag
@@ -11,7 +11,6 @@
#version 100
-float f() {
+void f() {
mediump ivec2 v;
- return 0.0;
}
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-03.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-03.frag
index 4ed9263..fcb63d9 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-03.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-03.frag
@@ -13,6 +13,4 @@
lowp int a[4];
-float f() {
- return 0.0;
-}
+void f() { }
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-01.frag
index abeb82c..a410d29 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-01.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-01.frag
@@ -10,7 +10,6 @@
#version 100
-float f() {
+void f() {
lowp int x = lowp 1;
- return 0.0;
}
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-02.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-02.frag
index 8daeb3b..a9364a0 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-02.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-02.frag
@@ -10,7 +10,6 @@
#version 100
-float f() {
+void f() {
lowp float x = lowp 0.0;
- return 0.0;
}
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-local-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-local-01.frag
index 4f7e285..674c2fd 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-local-01.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-local-01.frag
@@ -11,7 +11,6 @@
#version 100
-float f() {
+void f() {
lowp float x = 0.0;
- return 0.0;
}
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-01.frag
index 07161a2..f0063db 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-01.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-01.frag
@@ -16,6 +16,4 @@ lowp struct s {
lowp float a;
};
-float f() {
- return 0.0;
-}
+void f() { }
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-02.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-02.frag
index 4dcaa98..b14d175 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-02.frag
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-02.frag
@@ -16,6 +16,4 @@ lowp struct s {
float a;
};
-float f() {
- return 0.0;
-}
+void f() { }
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-vs-highp-01.vert b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-vs-highp-01.vert
index bf9a0eb..b7c7e26 100644
--- a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-vs-highp-01.vert
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-vs-highp-01.vert
@@ -13,6 +13,4 @@
highp float x;
-float f() {
- return 0.0;
-}
+void f() { }
--
1.8.1.4
More information about the Piglit
mailing list