[Piglit] [PATCH] arb_explicit_uniform_location: lower GL and GLSL requirements
Tapani Pälli
tapani.palli at intel.com
Tue Sep 2 01:32:05 PDT 2014
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
tests/spec/arb_explicit_uniform_location/array-elements.c | 6 ++++--
.../spec/arb_explicit_uniform_location/compiler/layout-01.frag | 7 ++++---
.../spec/arb_explicit_uniform_location/compiler/layout-01.vert | 7 ++++---
tests/spec/arb_explicit_uniform_location/inactive-uniform.c | 6 ++++--
.../linker/overlap-array-loc-stages.shader_test | 10 ++++++----
.../linker/overlap-array-loc.shader_test | 7 ++++---
.../linker/overlap-location-across-stages.shader_test | 10 ++++++----
.../linker/set-explicit-location-once-decl-twice.shader_test | 10 ++++++----
.../linker/set-explicit-location-twice.shader_test | 9 ++++++---
.../linker/set-location-to-sampler.shader_test | 7 ++++---
.../linker/set-same-explicit-location-twice.shader_test | 10 ++++++----
.../linker/unused-uniform-reserve-location.shader_test | 10 ++++++----
tests/spec/arb_explicit_uniform_location/loc-boundaries.c | 6 ++++--
.../arb_explicit_uniform_location/preprocessor/define.frag | 7 ++++---
.../arb_explicit_uniform_location/preprocessor/define.vert | 7 ++++---
15 files changed, 72 insertions(+), 47 deletions(-)
diff --git a/tests/spec/arb_explicit_uniform_location/array-elements.c b/tests/spec/arb_explicit_uniform_location/array-elements.c
index 72cb784..1fa91d4 100644
--- a/tests/spec/arb_explicit_uniform_location/array-elements.c
+++ b/tests/spec/arb_explicit_uniform_location/array-elements.c
@@ -34,7 +34,7 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
- config.supports_gl_core_version = 33;
+ config.supports_gl_compat_version = 20;
config.window_visual = PIGLIT_GL_VISUAL_RGB;
PIGLIT_GL_TEST_CONFIG_END
@@ -52,7 +52,8 @@ static const char vs_text[] =
"}";
static const char fs_text[] =
- "#version 330\n"
+ "#version 130\n"
+ "#extension GL_ARB_explicit_attrib_location: require\n"
"#extension GL_ARB_explicit_uniform_location: require\n"
"#define ARRAY_SIZE 16\n"
"layout(location = 1) uniform float r;\n"
@@ -68,6 +69,7 @@ piglit_init(int argc, char **argv)
{
GLuint prog, i;
+ piglit_require_extension("GL_ARB_explicit_attrib_location");
piglit_require_extension("GL_ARB_explicit_uniform_location");
prog = piglit_build_simple_program(vs_text, fs_text);
diff --git a/tests/spec/arb_explicit_uniform_location/compiler/layout-01.frag b/tests/spec/arb_explicit_uniform_location/compiler/layout-01.frag
index 988e437..60cdedc 100644
--- a/tests/spec/arb_explicit_uniform_location/compiler/layout-01.frag
+++ b/tests/spec/arb_explicit_uniform_location/compiler/layout-01.frag
@@ -1,11 +1,12 @@
// [config]
// expect_result: pass
-// glsl_version: 3.30
-// require_extensions: GL_ARB_explicit_uniform_location
+// glsl_version: 1.30
+// require_extensions: GL_ARB_explicit_attrib_location GL_ARB_explicit_uniform_location
// [end config]
//
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
vec4 color;
layout(location = 42) uniform float test1;
diff --git a/tests/spec/arb_explicit_uniform_location/compiler/layout-01.vert b/tests/spec/arb_explicit_uniform_location/compiler/layout-01.vert
index 738f4f4..0e90390 100644
--- a/tests/spec/arb_explicit_uniform_location/compiler/layout-01.vert
+++ b/tests/spec/arb_explicit_uniform_location/compiler/layout-01.vert
@@ -1,10 +1,11 @@
// [config]
// expect_result: pass
-// glsl_version: 3.30
-// require_extensions: GL_ARB_explicit_uniform_location
+// glsl_version: 1.30
+// require_extensions: GL_ARB_explicit_attrib_location GL_ARB_explicit_uniform_location
// [end config]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
vec4 vertex;
layout(location = 41) uniform float foo;
diff --git a/tests/spec/arb_explicit_uniform_location/inactive-uniform.c b/tests/spec/arb_explicit_uniform_location/inactive-uniform.c
index dcc7256..8f8dbc2 100644
--- a/tests/spec/arb_explicit_uniform_location/inactive-uniform.c
+++ b/tests/spec/arb_explicit_uniform_location/inactive-uniform.c
@@ -47,7 +47,7 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
- config.supports_gl_core_version = 33;
+ config.supports_gl_compat_version = 20;
config.window_visual = PIGLIT_GL_VISUAL_RGB;
PIGLIT_GL_TEST_CONFIG_END
@@ -65,7 +65,8 @@ static const char vs_text[] =
"}";
static const char fs_text[] =
- "#version 330\n"
+ "#version 130\n"
+ "#extension GL_ARB_explicit_attrib_location: require\n"
"#extension GL_ARB_explicit_uniform_location: require\n"
"layout(location = 7) uniform float var;\n"
"void main() {\n"
@@ -77,6 +78,7 @@ piglit_init(int argc, char **argv)
{
GLuint prog;
+ piglit_require_extension("GL_ARB_explicit_attrib_location");
piglit_require_extension("GL_ARB_explicit_uniform_location");
prog = piglit_build_simple_program(vs_text, fs_text);
diff --git a/tests/spec/arb_explicit_uniform_location/linker/overlap-array-loc-stages.shader_test b/tests/spec/arb_explicit_uniform_location/linker/overlap-array-loc-stages.shader_test
index f3d04e2..1ca8946 100644
--- a/tests/spec/arb_explicit_uniform_location/linker/overlap-array-loc-stages.shader_test
+++ b/tests/spec/arb_explicit_uniform_location/linker/overlap-array-loc-stages.shader_test
@@ -8,12 +8,13 @@
# will be generated"
[require]
-GL >= 3.3
-GLSL >= 3.30
+GLSL >= 1.30
+GL_ARB_explicit_attrib_location
GL_ARB_explicit_uniform_location
[vertex shader]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
layout(location = 2) uniform vec4 vertex;
@@ -23,7 +24,8 @@ void main()
}
[fragment shader]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
layout(location = 0) uniform float a[16];
diff --git a/tests/spec/arb_explicit_uniform_location/linker/overlap-array-loc.shader_test b/tests/spec/arb_explicit_uniform_location/linker/overlap-array-loc.shader_test
index 02897e4..47c4be4 100644
--- a/tests/spec/arb_explicit_uniform_location/linker/overlap-array-loc.shader_test
+++ b/tests/spec/arb_explicit_uniform_location/linker/overlap-array-loc.shader_test
@@ -8,14 +8,15 @@
# will be generated"
[require]
-GL >= 3.3
-GLSL >= 3.30
+GLSL >= 1.30
+GL_ARB_explicit_attrib_location
GL_ARB_explicit_uniform_location
[vertex shader passthrough]
[fragment shader]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
layout(location = 0) uniform float a[16];
layout(location = 2) uniform float r;
diff --git a/tests/spec/arb_explicit_uniform_location/linker/overlap-location-across-stages.shader_test b/tests/spec/arb_explicit_uniform_location/linker/overlap-location-across-stages.shader_test
index 4b69ceb..d1495bb 100644
--- a/tests/spec/arb_explicit_uniform_location/linker/overlap-location-across-stages.shader_test
+++ b/tests/spec/arb_explicit_uniform_location/linker/overlap-location-across-stages.shader_test
@@ -9,12 +9,13 @@
# will be generated"
[require]
-GL >= 3.3
-GLSL >= 3.30
+GLSL >= 1.30
+GL_ARB_explicit_attrib_location
GL_ARB_explicit_uniform_location
[vertex shader]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
layout(location = 42) uniform vec4 offset;
vec4 vertex;
@@ -24,7 +25,8 @@ void main()
}
[fragment shader]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
layout(location = 42) uniform vec4 color;
void main()
diff --git a/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-once-decl-twice.shader_test b/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-once-decl-twice.shader_test
index c06ada1..da9213a 100644
--- a/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-once-decl-twice.shader_test
+++ b/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-once-decl-twice.shader_test
@@ -3,12 +3,13 @@
# same uniform without explicit location in fragment stage.
[require]
-GL >= 3.3
-GLSL >= 3.30
+GLSL >= 1.30
+GL_ARB_explicit_attrib_location
GL_ARB_explicit_uniform_location
[vertex shader]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
layout(location = 0) uniform vec4 foo;
vec4 vertex;
@@ -18,7 +19,8 @@ void main()
}
[fragment shader]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
uniform vec4 foo;
void main()
diff --git a/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-twice.shader_test b/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-twice.shader_test
index 2e768d1..dd12439 100644
--- a/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-twice.shader_test
+++ b/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-twice.shader_test
@@ -2,11 +2,13 @@
# Tests setting 2 different explicit locations to same uniform variable.
[require]
-GLSL >= 3.30
+GLSL >= 1.30
+GL_ARB_explicit_attrib_location
GL_ARB_explicit_uniform_location
[vertex shader]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
layout(location = 0) uniform vec4 foo;
vec4 vertex;
@@ -16,7 +18,8 @@ void main()
}
[fragment shader]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
layout(location = 1) uniform vec4 foo;
void main()
diff --git a/tests/spec/arb_explicit_uniform_location/linker/set-location-to-sampler.shader_test b/tests/spec/arb_explicit_uniform_location/linker/set-location-to-sampler.shader_test
index c2716e3..31c0c69 100644
--- a/tests/spec/arb_explicit_uniform_location/linker/set-location-to-sampler.shader_test
+++ b/tests/spec/arb_explicit_uniform_location/linker/set-location-to-sampler.shader_test
@@ -2,14 +2,15 @@
# Tests that an opaque type (sampler) gets a location succesfully
#
[require]
-GL >= 3.3
-GLSL >= 3.30
+GLSL >= 1.30
+GL_ARB_explicit_attrib_location
GL_ARB_explicit_uniform_location
[vertex shader passthrough]
[fragment shader]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
layout(location = 0) uniform sampler2D tex;
out vec4 color;
diff --git a/tests/spec/arb_explicit_uniform_location/linker/set-same-explicit-location-twice.shader_test b/tests/spec/arb_explicit_uniform_location/linker/set-same-explicit-location-twice.shader_test
index d72ca92..f03af68 100644
--- a/tests/spec/arb_explicit_uniform_location/linker/set-same-explicit-location-twice.shader_test
+++ b/tests/spec/arb_explicit_uniform_location/linker/set-same-explicit-location-twice.shader_test
@@ -2,12 +2,13 @@
# Tests setting same explicit locations twice to same uniform variable.
[require]
-GL >= 3.3
-GLSL >= 3.30
+GLSL >= 1.30
+GL_ARB_explicit_attrib_location
GL_ARB_explicit_uniform_location
[vertex shader]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
layout(location = 0) uniform vec4 foo;
vec4 vertex;
@@ -17,7 +18,8 @@ void main()
}
[fragment shader]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
layout(location = 0) uniform vec4 foo;
void main()
diff --git a/tests/spec/arb_explicit_uniform_location/linker/unused-uniform-reserve-location.shader_test b/tests/spec/arb_explicit_uniform_location/linker/unused-uniform-reserve-location.shader_test
index 61c85db..c4f10d2 100644
--- a/tests/spec/arb_explicit_uniform_location/linker/unused-uniform-reserve-location.shader_test
+++ b/tests/spec/arb_explicit_uniform_location/linker/unused-uniform-reserve-location.shader_test
@@ -10,12 +10,13 @@
# error will be generated."
[require]
-GL >= 3.3
-GLSL >= 3.30
+GLSL >= 1.30
+GL_ARB_explicit_attrib_location
GL_ARB_explicit_uniform_location
[vertex shader]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
layout(location = 0) uniform float array[128];
vec4 vertex;
@@ -25,7 +26,8 @@ void main()
}
[fragment shader]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
layout(location = 127) uniform vec4 color;
void main()
diff --git a/tests/spec/arb_explicit_uniform_location/loc-boundaries.c b/tests/spec/arb_explicit_uniform_location/loc-boundaries.c
index 769fcd4..3e9738a 100644
--- a/tests/spec/arb_explicit_uniform_location/loc-boundaries.c
+++ b/tests/spec/arb_explicit_uniform_location/loc-boundaries.c
@@ -43,7 +43,7 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
- config.supports_gl_core_version = 33;
+ config.supports_gl_compat_version = 20;
config.window_visual = PIGLIT_GL_VISUAL_RGB;
PIGLIT_GL_TEST_CONFIG_END
@@ -61,7 +61,8 @@ static const char vs_text[] =
"}";
static const char fs_template[] =
- "#version 330\n"
+ "#version 130\n"
+ "#extension GL_ARB_explicit_attrib_location: require\n"
"#extension GL_ARB_explicit_uniform_location: require\n"
"uniform float a;\n"
"layout(location = %d) uniform float r;\n"
@@ -78,6 +79,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
char *f_sha;
+ piglit_require_extension("GL_ARB_explicit_attrib_location");
piglit_require_extension("GL_ARB_explicit_uniform_location");
glGetIntegerv(GL_MAX_UNIFORM_LOCATIONS, &maxloc);
diff --git a/tests/spec/arb_explicit_uniform_location/preprocessor/define.frag b/tests/spec/arb_explicit_uniform_location/preprocessor/define.frag
index 1aab638..c88dd73 100644
--- a/tests/spec/arb_explicit_uniform_location/preprocessor/define.frag
+++ b/tests/spec/arb_explicit_uniform_location/preprocessor/define.frag
@@ -1,10 +1,11 @@
// [config]
// expect_result: pass
-// glsl_version: 3.30
-// require_extensions: GL_ARB_explicit_uniform_location
+// glsl_version: 1.30
+// require_extensions: GL_ARB_explicit_attrib_location GL_ARB_explicit_uniform_location
// [end config]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
#if !defined GL_ARB_explicit_uniform_location
diff --git a/tests/spec/arb_explicit_uniform_location/preprocessor/define.vert b/tests/spec/arb_explicit_uniform_location/preprocessor/define.vert
index 1aab638..c88dd73 100644
--- a/tests/spec/arb_explicit_uniform_location/preprocessor/define.vert
+++ b/tests/spec/arb_explicit_uniform_location/preprocessor/define.vert
@@ -1,10 +1,11 @@
// [config]
// expect_result: pass
-// glsl_version: 3.30
-// require_extensions: GL_ARB_explicit_uniform_location
+// glsl_version: 1.30
+// require_extensions: GL_ARB_explicit_attrib_location GL_ARB_explicit_uniform_location
// [end config]
-#version 330
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
#extension GL_ARB_explicit_uniform_location: require
#if !defined GL_ARB_explicit_uniform_location
--
1.8.3.1
More information about the Piglit
mailing list