summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2012-02-27 09:50:42 -0800
committerPaul Berry <stereotype441@gmail.com>2012-03-07 18:20:27 -0800
commit7ffd7d0691baabaefc3e12dcc5f7f4780a3a3fd9 (patch)
treefce3f9ca497a2f072f7941cbaf9f19605594b834 /tests
parentac16e8c519ad5b5f6f17a7da41d627338a3d2b0d (diff)
Stop using GLEW_VERSION_* macros
Several tests were checking the GL version using GLEW's GLEW_VERSION_* macros. This patch changes the tests to use piglit_get_gl_version(), which provides the same functionality in a way that is not dependent on GLEW. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/fdo25614-genmipmap.c2
-rw-r--r--tests/bugs/fdo31934.c2
-rw-r--r--tests/bugs/point-sprite.c4
-rw-r--r--tests/fbo/fbo-alphatest-nocolor.c2
-rw-r--r--tests/fbo/fbo-copypix.c2
-rw-r--r--tests/fbo/fbo-drawbuffers-blend-add.c2
-rw-r--r--tests/fbo/fbo-drawbuffers-fragcolor.c2
-rw-r--r--tests/fbo/fbo-drawbuffers-maxtargets.c2
-rw-r--r--tests/fbo/fbo-fragcoord.c2
-rw-r--r--tests/fbo/fbo-fragcoord2.c2
-rw-r--r--tests/fbo/fbo-readdrawpix.c2
-rw-r--r--tests/general/bgra-sec-color-pointer.c2
-rw-r--r--tests/general/bgra-vert-attrib-pointer.c2
-rw-r--r--tests/general/blendminmax.c2
-rw-r--r--tests/general/blendsquare.c2
-rw-r--r--tests/general/clear-varray-2.0.c2
-rw-r--r--tests/general/draw-batch.c2
-rw-r--r--tests/general/draw-elements-base-vertex-neg.c2
-rw-r--r--tests/general/draw-elements-vs-inputs.c2
-rw-r--r--tests/general/draw-elements.c2
-rw-r--r--tests/general/draw-vertices-half-float.c2
-rw-r--r--tests/general/draw-vertices.c2
-rw-r--r--tests/general/early-z.c2
-rw-r--r--tests/general/isbufferobj.c2
-rw-r--r--tests/general/occlusion-query-discard.c2
-rw-r--r--tests/general/occlusion_query.c2
-rw-r--r--tests/general/stencil-twoside.c4
-rw-r--r--tests/general/stencil-wrap.c2
-rw-r--r--tests/general/texunits.c2
-rw-r--r--tests/general/vao-element-array-buffer.c2
-rw-r--r--tests/glx/glx-shader-sharing.c2
-rw-r--r--tests/shaders/activeprogram-bad-program.c2
-rw-r--r--tests/shaders/activeprogram-get.c2
-rw-r--r--tests/shaders/createshaderprogram-attached-shaders.c2
-rw-r--r--tests/shaders/createshaderprogram-bad-type.c2
-rw-r--r--tests/shaders/fp-fog.c2
-rw-r--r--tests/shaders/fp-fragment-position.c2
-rw-r--r--tests/shaders/fp-kil.c2
-rw-r--r--tests/shaders/glsl-arb-fragment-coord-conventions-define.c2
-rw-r--r--tests/shaders/glsl-arb-fragment-coord-conventions.c2
-rw-r--r--tests/shaders/glsl-bindattriblocation.c2
-rw-r--r--tests/shaders/glsl-cos.c2
-rw-r--r--tests/shaders/glsl-deriv-varyings.c2
-rw-r--r--tests/shaders/glsl-derivs.c2
-rw-r--r--tests/shaders/glsl-dlist-getattriblocation.c2
-rw-r--r--tests/shaders/glsl-empty-vs-no-fs.c2
-rw-r--r--tests/shaders/glsl-explicit-location-01.c2
-rw-r--r--tests/shaders/glsl-explicit-location-02.c2
-rw-r--r--tests/shaders/glsl-explicit-location-03.c2
-rw-r--r--tests/shaders/glsl-explicit-location-04.c2
-rw-r--r--tests/shaders/glsl-explicit-location-05.c2
-rw-r--r--tests/shaders/glsl-fs-bug25902.c2
-rw-r--r--tests/shaders/glsl-fs-exp2.c2
-rw-r--r--tests/shaders/glsl-fs-flat-color.c2
-rw-r--r--tests/shaders/glsl-fs-fogcolor-statechange.c2
-rw-r--r--tests/shaders/glsl-fs-fragcoord-zw-ortho.c2
-rw-r--r--tests/shaders/glsl-fs-fragcoord-zw-perspective.c2
-rw-r--r--tests/shaders/glsl-fs-fragcoord.c2
-rw-r--r--tests/shaders/glsl-fs-loop-nested.c2
-rw-r--r--tests/shaders/glsl-fs-loop.c2
-rw-r--r--tests/shaders/glsl-fs-mix-constant.c2
-rw-r--r--tests/shaders/glsl-fs-mix.c2
-rw-r--r--tests/shaders/glsl-fs-pointcoord.c2
-rw-r--r--tests/shaders/glsl-fs-raytrace-bug27060.c2
-rw-r--r--tests/shaders/glsl-fs-sampler-numbering.c2
-rw-r--r--tests/shaders/glsl-fs-shader-stencil-export.c2
-rw-r--r--tests/shaders/glsl-fs-sqrt-branch.c2
-rw-r--r--tests/shaders/glsl-fs-sqrt-zero.c2
-rw-r--r--tests/shaders/glsl-fs-texture2drect.c2
-rw-r--r--tests/shaders/glsl-fs-texturecube-2.c2
-rw-r--r--tests/shaders/glsl-fs-texturecube.c2
-rw-r--r--tests/shaders/glsl-fs-textureenvcolor-statechange.c2
-rw-r--r--tests/shaders/glsl-fs-texturelod-01.c2
-rw-r--r--tests/shaders/glsl-fs-user-varying-ff.c2
-rw-r--r--tests/shaders/glsl-fwidth.c2
-rw-r--r--tests/shaders/glsl-getactiveuniform-array-size.c2
-rw-r--r--tests/shaders/glsl-getactiveuniform-length.c2
-rw-r--r--tests/shaders/glsl-getattriblocation.c2
-rw-r--r--tests/shaders/glsl-invalid-asm-01.c2
-rw-r--r--tests/shaders/glsl-invalid-asm-02.c2
-rw-r--r--tests/shaders/glsl-kwin-blur-1.c2
-rw-r--r--tests/shaders/glsl-kwin-blur-2.c2
-rw-r--r--tests/shaders/glsl-light-model.c2
-rw-r--r--tests/shaders/glsl-link-bug30552.c2
-rw-r--r--tests/shaders/glsl-link-bug38015.c2
-rw-r--r--tests/shaders/glsl-link-empty-prog-01.c2
-rw-r--r--tests/shaders/glsl-link-empty-prog-02.c2
-rw-r--r--tests/shaders/glsl-link-initializer-03.c2
-rw-r--r--tests/shaders/glsl-link-test.c4
-rw-r--r--tests/shaders/glsl-lod-bias.c2
-rw-r--r--tests/shaders/glsl-mat-attribute.c2
-rw-r--r--tests/shaders/glsl-max-varyings.c2
-rw-r--r--tests/shaders/glsl-max-vertex-attrib.c2
-rw-r--r--tests/shaders/glsl-novertexdata.c2
-rw-r--r--tests/shaders/glsl-orangebook-ch06-bump.c2
-rw-r--r--tests/shaders/glsl-preprocessor-comments.c2
-rw-r--r--tests/shaders/glsl-routing.c2
-rw-r--r--tests/shaders/glsl-sin.c2
-rw-r--r--tests/shaders/glsl-uniform-update.c2
-rw-r--r--tests/shaders/glsl-unused-varying.c2
-rw-r--r--tests/shaders/glsl-useprogram-displaylist.c2
-rw-r--r--tests/shaders/glsl-vs-arrays.c2
-rw-r--r--tests/shaders/glsl-vs-functions.c2
-rw-r--r--tests/shaders/glsl-vs-if-bool.c2
-rw-r--r--tests/shaders/glsl-vs-loop-nested.c2
-rw-r--r--tests/shaders/glsl-vs-loop.c2
-rw-r--r--tests/shaders/glsl-vs-mov-after-deref.c2
-rw-r--r--tests/shaders/glsl-vs-mvp-statechange.c2
-rw-r--r--tests/shaders/glsl-vs-normalscale.c2
-rw-r--r--tests/shaders/glsl-vs-point-size.c2
-rw-r--r--tests/shaders/glsl-vs-raytrace-bug26691.c2
-rw-r--r--tests/shaders/glsl-vs-sqrt-zero.c2
-rw-r--r--tests/shaders/glsl-vs-statechange-1.c2
-rw-r--r--tests/shaders/glsl-vs-texturematrix-1.c2
-rw-r--r--tests/shaders/glsl-vs-texturematrix-2.c2
-rw-r--r--tests/shaders/glsl-vs-user-varying-ff.c2
-rw-r--r--tests/shaders/link-mismatch-layout-01.c2
-rw-r--r--tests/shaders/link-mismatch-layout-02.c2
-rw-r--r--tests/shaders/link-mismatch-layout-03.c2
-rw-r--r--tests/shaders/link-unresolved-function.c2
-rw-r--r--tests/shaders/sso-simple.c2
-rw-r--r--tests/shaders/sso-uniforms-01.c2
-rw-r--r--tests/shaders/sso-uniforms-02.c2
-rw-r--r--tests/shaders/sso-user-varying-01.c2
-rw-r--r--tests/shaders/sso-user-varying-02.c2
-rw-r--r--tests/shaders/trinity-fp1.c2
-rw-r--r--tests/shaders/useprogram-flushverts-1.c2
-rw-r--r--tests/shaders/useprogram-flushverts-2.c2
-rw-r--r--tests/shaders/useprogram-inside-begin.c2
-rw-r--r--tests/shaders/useprogram-refcount-1.c2
-rw-r--r--tests/shaders/useshaderprogram-bad-program.c2
-rw-r--r--tests/shaders/useshaderprogram-bad-type.c2
-rw-r--r--tests/shaders/useshaderprogram-flushverts-1.c2
-rw-r--r--tests/shaders/vp-ignore-input.c2
-rw-r--r--tests/shaders/vpfp-generic.cpp2
-rw-r--r--tests/spec/arb_copy_buffer/copy_buffer_coherency.c2
-rw-r--r--tests/spec/arb_es2_compatibility/arb_es2_compatibility-fixed-type.c2
-rw-r--r--tests/spec/arb_es2_compatibility/arb_es2_compatibility-getshaderprecisionformat.c2
-rw-r--r--tests/spec/arb_es2_compatibility/arb_es2_compatibility-maxvectors.c2
-rw-r--r--tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c2
-rw-r--r--tests/spec/arb_es2_compatibility/arb_es2_compatibility-shadercompiler.c2
-rw-r--r--tests/spec/arb_map_buffer_range/map_buffer_range_error_check.c2
-rw-r--r--tests/spec/arb_map_buffer_range/map_buffer_range_test.c2
-rw-r--r--tests/spec/arb_robustness/draw-vbo-bounds.c2
-rw-r--r--tests/spec/arb_transform_feedback2/draw-auto.c2
-rw-r--r--tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c2
-rw-r--r--tests/spec/ext_timer_query/time-elapsed.c2
-rw-r--r--tests/spec/ext_transform_feedback/interleaved.c2
-rw-r--r--tests/spec/ext_transform_feedback/output-type.c2
-rw-r--r--tests/spec/ext_transform_feedback/position.c2
-rw-r--r--tests/spec/ext_transform_feedback/separate.c2
-rw-r--r--tests/spec/gl-2.0/vertex-program-two-side.c2
-rw-r--r--tests/spec/gl-3.0/required-renderbuffer-attachment-formats.c2
-rw-r--r--tests/spec/gl-3.0/required-sized-texture-formats.c2
-rw-r--r--tests/spec/gl-3.0/required-texture-attachment-formats.c2
-rw-r--r--tests/spec/nv_conditional_render/begin-while-active.c2
-rw-r--r--tests/spec/nv_conditional_render/begin-zero.c2
-rw-r--r--tests/spec/nv_conditional_render/bitmap.c2
-rw-r--r--tests/spec/nv_conditional_render/blitframebuffer.c2
-rw-r--r--tests/spec/nv_conditional_render/clear.c2
-rw-r--r--tests/spec/nv_conditional_render/copypixels.c2
-rw-r--r--tests/spec/nv_conditional_render/copyteximage.c2
-rw-r--r--tests/spec/nv_conditional_render/copytexsubimage.c2
-rw-r--r--tests/spec/nv_conditional_render/dlist.c2
-rw-r--r--tests/spec/nv_conditional_render/drawpixels.c2
-rw-r--r--tests/spec/nv_conditional_render/generatemipmap.c2
-rw-r--r--tests/spec/nv_conditional_render/vertex_array.c2
-rw-r--r--tests/texturing/depth-tex-modes-glsl.c2
-rw-r--r--tests/texturing/fragment-and-vertex-texturing.c2
-rw-r--r--tests/texturing/gen-nonzero-unit.c2
-rw-r--r--tests/texturing/lodbias.c2
-rw-r--r--tests/texturing/tex-miplevel-selection.c2
-rw-r--r--tests/texturing/tex-skipped-unit.c2
-rw-r--r--tests/texturing/tex3d-maxsize.c2
-rw-r--r--tests/texturing/tex3d.c2
-rw-r--r--tests/texturing/texrect-many.c2
-rw-r--r--tests/util/piglit-framework.c2
-rw-r--r--tests/util/piglit-shader-gl.c6
-rw-r--r--tests/util/piglit-transform-feedback.c2
179 files changed, 184 insertions, 184 deletions
diff --git a/tests/bugs/fdo25614-genmipmap.c b/tests/bugs/fdo25614-genmipmap.c
index 4182ce258..aaaa3f964 100644
--- a/tests/bugs/fdo25614-genmipmap.c
+++ b/tests/bugs/fdo25614-genmipmap.c
@@ -60,7 +60,7 @@ piglit_init(int argc, char **argv)
(void) argc;
(void) argv;
- if (!GLEW_VERSION_1_3) {
+ if (piglit_get_gl_version() < 13) {
printf("Requires OpenGL 1.3\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/bugs/fdo31934.c b/tests/bugs/fdo31934.c
index f4dfd623e..1400d4787 100644
--- a/tests/bugs/fdo31934.c
+++ b/tests/bugs/fdo31934.c
@@ -8,7 +8,7 @@ piglit_init(int argc, char *argv[])
{
GLuint id;
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
printf("Requires OpenGL 1.5\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/bugs/point-sprite.c b/tests/bugs/point-sprite.c
index 5ef138221..574b07dda 100644
--- a/tests/bugs/point-sprite.c
+++ b/tests/bugs/point-sprite.c
@@ -77,7 +77,7 @@ enum piglit_result
piglit_display(void)
{
static const GLenum origins[2] = { GL_UPPER_LEFT, GL_LOWER_LEFT };
- const unsigned num_rows = (GLEW_VERSION_2_0) ? 2 : 1;
+ const unsigned num_rows = (piglit_get_gl_version() >= 20) ? 2 : 1;
GLboolean pass = GL_TRUE;
unsigned i;
unsigned j;
@@ -95,7 +95,7 @@ piglit_display(void)
/* OpenGL version must be at least 2.0 to support modifying
* GL_POINT_SPRITE_COORD_ORIGIN.
*/
- if (GLEW_VERSION_2_0)
+ if (piglit_get_gl_version() >= 20)
glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN,
origins[i]);
diff --git a/tests/fbo/fbo-alphatest-nocolor.c b/tests/fbo/fbo-alphatest-nocolor.c
index a964cefee..0bc37ee5d 100644
--- a/tests/fbo/fbo-alphatest-nocolor.c
+++ b/tests/fbo/fbo-alphatest-nocolor.c
@@ -159,7 +159,7 @@ void piglit_init(int argc, char **argv)
{
GLuint fs, vs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/fbo/fbo-copypix.c b/tests/fbo/fbo-copypix.c
index 87dde533b..2a96f0bae 100644
--- a/tests/fbo/fbo-copypix.c
+++ b/tests/fbo/fbo-copypix.c
@@ -209,7 +209,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_1_4) {
+ if (piglit_get_gl_version() < 14) {
printf("Requires OpenGL 1.4\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/fbo/fbo-drawbuffers-blend-add.c b/tests/fbo/fbo-drawbuffers-blend-add.c
index c5722fc15..d41d9cd78 100644
--- a/tests/fbo/fbo-drawbuffers-blend-add.c
+++ b/tests/fbo/fbo-drawbuffers-blend-add.c
@@ -229,7 +229,7 @@ piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/fbo/fbo-drawbuffers-fragcolor.c b/tests/fbo/fbo-drawbuffers-fragcolor.c
index 561ecf400..fdcaac32c 100644
--- a/tests/fbo/fbo-drawbuffers-fragcolor.c
+++ b/tests/fbo/fbo-drawbuffers-fragcolor.c
@@ -178,7 +178,7 @@ piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/fbo/fbo-drawbuffers-maxtargets.c b/tests/fbo/fbo-drawbuffers-maxtargets.c
index 061527077..9fbf9ac6d 100644
--- a/tests/fbo/fbo-drawbuffers-maxtargets.c
+++ b/tests/fbo/fbo-drawbuffers-maxtargets.c
@@ -186,7 +186,7 @@ piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/fbo/fbo-fragcoord.c b/tests/fbo/fbo-fragcoord.c
index 830214b34..60ffd5bd2 100644
--- a/tests/fbo/fbo-fragcoord.c
+++ b/tests/fbo/fbo-fragcoord.c
@@ -139,7 +139,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/fbo/fbo-fragcoord2.c b/tests/fbo/fbo-fragcoord2.c
index 48230e48b..3823b157b 100644
--- a/tests/fbo/fbo-fragcoord2.c
+++ b/tests/fbo/fbo-fragcoord2.c
@@ -208,7 +208,7 @@ piglit_init(int argc, char**argv)
{
GLuint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/fbo/fbo-readdrawpix.c b/tests/fbo/fbo-readdrawpix.c
index 0e879c956..c17c8afb6 100644
--- a/tests/fbo/fbo-readdrawpix.c
+++ b/tests/fbo/fbo-readdrawpix.c
@@ -212,7 +212,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_1_4) {
+ if (piglit_get_gl_version() < 14) {
printf("Requires OpenGL 1.4\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/general/bgra-sec-color-pointer.c b/tests/general/bgra-sec-color-pointer.c
index 87a21e476..e94f545d7 100644
--- a/tests/general/bgra-sec-color-pointer.c
+++ b/tests/general/bgra-sec-color-pointer.c
@@ -50,7 +50,7 @@ static GLubyte colors[16] = {255, 0, 0, 127,
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_1_4) {
+ if (piglit_get_gl_version() < 14) {
printf("Requires OpenGL 1.4\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/general/bgra-vert-attrib-pointer.c b/tests/general/bgra-vert-attrib-pointer.c
index 176f655e0..7f0d53f2f 100644
--- a/tests/general/bgra-vert-attrib-pointer.c
+++ b/tests/general/bgra-vert-attrib-pointer.c
@@ -108,7 +108,7 @@ compileLinkProg(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/general/blendminmax.c b/tests/general/blendminmax.c
index 172c5b0a2..ece172190 100644
--- a/tests/general/blendminmax.c
+++ b/tests/general/blendminmax.c
@@ -130,7 +130,7 @@ piglit_init(int argc, char **argv)
piglit_report_result(PIGLIT_SKIP);
}
- if (!GLEW_VERSION_1_4) {
+ if (piglit_get_gl_version() < 14) {
printf("Requires OpenGL 1.4\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/general/blendsquare.c b/tests/general/blendsquare.c
index 3f2302c12..c0ba61f5c 100644
--- a/tests/general/blendsquare.c
+++ b/tests/general/blendsquare.c
@@ -89,7 +89,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_1_4 && !GLEW_NV_blend_square) {
+ if (piglit_get_gl_version() < 14 && !GLEW_NV_blend_square) {
printf("Sorry, this program requires either OpenGL 1.4 or "
"GL_NV_blend_square\n");
piglit_report_result(PIGLIT_SKIP);
diff --git a/tests/general/clear-varray-2.0.c b/tests/general/clear-varray-2.0.c
index e9763e0c4..ac853e4af 100644
--- a/tests/general/clear-varray-2.0.c
+++ b/tests/general/clear-varray-2.0.c
@@ -127,7 +127,7 @@ piglit_init(int argc, char **argv)
{
GLuint vert_prog, frag_prog;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/general/draw-batch.c b/tests/general/draw-batch.c
index 150cf7b15..a9cc120ee 100644
--- a/tests/general/draw-batch.c
+++ b/tests/general/draw-batch.c
@@ -30,7 +30,7 @@ int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE;
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_1_4) {
+ if (piglit_get_gl_version() < 14) {
printf("Requires OpenGL 1.4.\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/general/draw-elements-base-vertex-neg.c b/tests/general/draw-elements-base-vertex-neg.c
index 26c01c5c1..ce45d74d9 100644
--- a/tests/general/draw-elements-base-vertex-neg.c
+++ b/tests/general/draw-elements-base-vertex-neg.c
@@ -44,7 +44,7 @@ void piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
printf("Requires OpenGL 1.5\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/general/draw-elements-vs-inputs.c b/tests/general/draw-elements-vs-inputs.c
index f376070d4..53e91c1b9 100644
--- a/tests/general/draw-elements-vs-inputs.c
+++ b/tests/general/draw-elements-vs-inputs.c
@@ -49,7 +49,7 @@ piglit_init(int argc, char **argv)
{
GLfloat red[4] = {1, 0, 0, 1};
- if (!GLEW_VERSION_1_2) {
+ if (piglit_get_gl_version() < 12) {
printf("Requires OpenGL 1.2\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/general/draw-elements.c b/tests/general/draw-elements.c
index 2356f106e..ea3b926a3 100644
--- a/tests/general/draw-elements.c
+++ b/tests/general/draw-elements.c
@@ -49,7 +49,7 @@ void piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
printf("Requires OpenGL 1.5\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/general/draw-vertices-half-float.c b/tests/general/draw-vertices-half-float.c
index b076f797d..cbb069f51 100644
--- a/tests/general/draw-vertices-half-float.c
+++ b/tests/general/draw-vertices-half-float.c
@@ -49,7 +49,7 @@ void piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
printf("Requires OpenGL 1.5\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/general/draw-vertices.c b/tests/general/draw-vertices.c
index a5b432699..81408c2c4 100644
--- a/tests/general/draw-vertices.c
+++ b/tests/general/draw-vertices.c
@@ -49,7 +49,7 @@ void piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
printf("Requires OpenGL 1.5\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/general/early-z.c b/tests/general/early-z.c
index ae5a5947d..a8eca342a 100644
--- a/tests/general/early-z.c
+++ b/tests/general/early-z.c
@@ -144,7 +144,7 @@ piglit_init(int argc, char **argv)
{
int i;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0 / GLSL\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/general/isbufferobj.c b/tests/general/isbufferobj.c
index 80ac737da..4f7141a22 100644
--- a/tests/general/isbufferobj.c
+++ b/tests/general/isbufferobj.c
@@ -100,7 +100,7 @@ piglit_display(void)
void
piglit_init(int argc, char**argv)
{
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
printf("Requires OpenGL 1.5\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/general/occlusion-query-discard.c b/tests/general/occlusion-query-discard.c
index cefd089e6..88b039c45 100644
--- a/tests/general/occlusion-query-discard.c
+++ b/tests/general/occlusion-query-discard.c
@@ -126,7 +126,7 @@ piglit_init(int argc, char **argv)
{
GLint query_bits;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/general/occlusion_query.c b/tests/general/occlusion_query.c
index 756e252be..9ed4dedcc 100644
--- a/tests/general/occlusion_query.c
+++ b/tests/general/occlusion_query.c
@@ -173,7 +173,7 @@ piglit_init(int argc, char **argv)
glDepthFunc(GL_LESS);
- if (GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() >= 15) {
gen_queries = GLEW_GET_FUN(__glewGenQueries);
begin_query = GLEW_GET_FUN(__glewBeginQuery);
end_query = GLEW_GET_FUN(__glewEndQuery);
diff --git a/tests/general/stencil-twoside.c b/tests/general/stencil-twoside.c
index 56cfd8132..fb92458d6 100644
--- a/tests/general/stencil-twoside.c
+++ b/tests/general/stencil-twoside.c
@@ -217,13 +217,13 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_ATI_separate_stencil && !GLEW_VERSION_2_0) {
+ if (!GLEW_ATI_separate_stencil && piglit_get_gl_version() < 20) {
printf("Sorry, this program requires either "
"GL_ATI_separate_stencil or OpenGL 2.0.\n");
piglit_report_result(PIGLIT_SKIP);
}
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
use20syntax = 0;
}
diff --git a/tests/general/stencil-wrap.c b/tests/general/stencil-wrap.c
index 6c4f8dcc2..388ddbad6 100644
--- a/tests/general/stencil-wrap.c
+++ b/tests/general/stencil-wrap.c
@@ -144,7 +144,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_EXT_stencil_wrap && !GLEW_VERSION_1_4) {
+ if (!GLEW_EXT_stencil_wrap && piglit_get_gl_version() < 14) {
printf("Sorry, this program requires either "
"GL_EXT_stencil_wrap or OpenGL 1.4.\n");
piglit_report_result(PIGLIT_SKIP);
diff --git a/tests/general/texunits.c b/tests/general/texunits.c
index e691724df..c2f5bb5ef 100644
--- a/tests/general/texunits.c
+++ b/tests/general/texunits.c
@@ -384,7 +384,7 @@ init(void)
void
piglit_init(int argc, char *argv[])
{
- if (!GLEW_VERSION_1_3) {
+ if (piglit_get_gl_version() < 13) {
printf("Requires OpenGL 1.3\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/general/vao-element-array-buffer.c b/tests/general/vao-element-array-buffer.c
index 6079e1f0f..fc438ef8c 100644
--- a/tests/general/vao-element-array-buffer.c
+++ b/tests/general/vao-element-array-buffer.c
@@ -68,7 +68,7 @@ piglit_init(int argc, char **argv)
};
GLubyte indices[] = {0, 1, 2, 3};
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
printf("Requires OpenGL 1.5\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/glx/glx-shader-sharing.c b/tests/glx/glx-shader-sharing.c
index bed19c261..583879a1d 100644
--- a/tests/glx/glx-shader-sharing.c
+++ b/tests/glx/glx-shader-sharing.c
@@ -90,7 +90,7 @@ draw(Display *dpy)
glewInit();
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("%s: Requires OpenGL 2.0\n", TestName);
return PIGLIT_SKIP;
}
diff --git a/tests/shaders/activeprogram-bad-program.c b/tests/shaders/activeprogram-bad-program.c
index f87a94e93..a4025bfb0 100644
--- a/tests/shaders/activeprogram-bad-program.c
+++ b/tests/shaders/activeprogram-bad-program.c
@@ -54,7 +54,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLuint vs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/activeprogram-get.c b/tests/shaders/activeprogram-get.c
index b0fd2c36a..04526eefa 100644
--- a/tests/shaders/activeprogram-get.c
+++ b/tests/shaders/activeprogram-get.c
@@ -49,7 +49,7 @@ piglit_init(int argc, char **argv)
GLuint got;
GLuint vs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/createshaderprogram-attached-shaders.c b/tests/shaders/createshaderprogram-attached-shaders.c
index c54c5bc0b..12c2fead3 100644
--- a/tests/shaders/createshaderprogram-attached-shaders.c
+++ b/tests/shaders/createshaderprogram-attached-shaders.c
@@ -50,7 +50,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLenum err;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/createshaderprogram-bad-type.c b/tests/shaders/createshaderprogram-bad-type.c
index 315137955..8871fcf43 100644
--- a/tests/shaders/createshaderprogram-bad-type.c
+++ b/tests/shaders/createshaderprogram-bad-type.c
@@ -110,7 +110,7 @@ piglit_init(int argc, char **argv)
? 0 : GL_INVALID_ENUM;
GLboolean pass;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/fp-fog.c b/tests/shaders/fp-fog.c
index aa30f3530..cbc0dc9e0 100644
--- a/tests/shaders/fp-fog.c
+++ b/tests/shaders/fp-fog.c
@@ -134,7 +134,7 @@ piglit_init(int argc, char **argv)
glClearColor(0.3, 0.3, 0.3, 0.3);
- if (GLEW_VERSION_1_4) {
+ if (piglit_get_gl_version() >= 14) {
pglFogCoordf = glFogCoordf;
} else if (GLEW_EXT_fog_coord) {
pglFogCoordf = glFogCoordfEXT;
diff --git a/tests/shaders/fp-fragment-position.c b/tests/shaders/fp-fragment-position.c
index b2f34a7be..3859d1cb4 100644
--- a/tests/shaders/fp-fragment-position.c
+++ b/tests/shaders/fp-fragment-position.c
@@ -274,7 +274,7 @@ piglit_init(int argc, char **argv)
GLubyte rectangle[200][200][4];
GLubyte tex[256*256][4];
- if (!GLEW_VERSION_1_3) {
+ if (piglit_get_gl_version() < 13) {
printf("Requires OpenGL 1.3\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/fp-kil.c b/tests/shaders/fp-kil.c
index 3999d19bf..b32361d4e 100644
--- a/tests/shaders/fp-kil.c
+++ b/tests/shaders/fp-kil.c
@@ -278,7 +278,7 @@ piglit_init(int argc, char **argv)
glutReshapeFunc(Reshape);
- if (!GLEW_VERSION_1_3) {
+ if (piglit_get_gl_version() < 13) {
printf("Requires OpenGL 1.3\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-arb-fragment-coord-conventions-define.c b/tests/shaders/glsl-arb-fragment-coord-conventions-define.c
index b09bd4fc9..274708164 100644
--- a/tests/shaders/glsl-arb-fragment-coord-conventions-define.c
+++ b/tests/shaders/glsl-arb-fragment-coord-conventions-define.c
@@ -61,7 +61,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-arb-fragment-coord-conventions.c b/tests/shaders/glsl-arb-fragment-coord-conventions.c
index 81648b688..e6f81a5a0 100644
--- a/tests/shaders/glsl-arb-fragment-coord-conventions.c
+++ b/tests/shaders/glsl-arb-fragment-coord-conventions.c
@@ -218,7 +218,7 @@ static void key_func(unsigned char key, int x, int y)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-bindattriblocation.c b/tests/shaders/glsl-bindattriblocation.c
index dd1ebde71..aa389cee1 100644
--- a/tests/shaders/glsl-bindattriblocation.c
+++ b/tests/shaders/glsl-bindattriblocation.c
@@ -126,7 +126,7 @@ piglit_init(int argc, char **argv)
{
piglit_require_vertex_shader();
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
exit(1);
diff --git a/tests/shaders/glsl-cos.c b/tests/shaders/glsl-cos.c
index 14dc907ff..6e3867f84 100644
--- a/tests/shaders/glsl-cos.c
+++ b/tests/shaders/glsl-cos.c
@@ -109,7 +109,7 @@ enum piglit_result piglit_display(void)
void piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-deriv-varyings.c b/tests/shaders/glsl-deriv-varyings.c
index 3b4902002..fe37326f9 100644
--- a/tests/shaders/glsl-deriv-varyings.c
+++ b/tests/shaders/glsl-deriv-varyings.c
@@ -87,7 +87,7 @@ static const char *fragShaderText2 =
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-derivs.c b/tests/shaders/glsl-derivs.c
index 7f350fbe9..c2c155e50 100644
--- a/tests/shaders/glsl-derivs.c
+++ b/tests/shaders/glsl-derivs.c
@@ -86,7 +86,7 @@ static const char *fragShaderText2 =
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-dlist-getattriblocation.c b/tests/shaders/glsl-dlist-getattriblocation.c
index 782921885..e33101449 100644
--- a/tests/shaders/glsl-dlist-getattriblocation.c
+++ b/tests/shaders/glsl-dlist-getattriblocation.c
@@ -95,7 +95,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
exit(1);
diff --git a/tests/shaders/glsl-empty-vs-no-fs.c b/tests/shaders/glsl-empty-vs-no-fs.c
index 1954e4d09..efa9d22bc 100644
--- a/tests/shaders/glsl-empty-vs-no-fs.c
+++ b/tests/shaders/glsl-empty-vs-no-fs.c
@@ -73,7 +73,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-explicit-location-01.c b/tests/shaders/glsl-explicit-location-01.c
index 6a91031d5..ada2b55ba 100644
--- a/tests/shaders/glsl-explicit-location-01.c
+++ b/tests/shaders/glsl-explicit-location-01.c
@@ -48,7 +48,7 @@ void piglit_init(int argc, char **argv)
GLint prog;
GLboolean ok;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-explicit-location-02.c b/tests/shaders/glsl-explicit-location-02.c
index f04001228..9cf2dfc7d 100644
--- a/tests/shaders/glsl-explicit-location-02.c
+++ b/tests/shaders/glsl-explicit-location-02.c
@@ -51,7 +51,7 @@ void piglit_init(int argc, char **argv)
GLint loc;
GLboolean ok;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-explicit-location-03.c b/tests/shaders/glsl-explicit-location-03.c
index 27b4fea05..9970160b3 100644
--- a/tests/shaders/glsl-explicit-location-03.c
+++ b/tests/shaders/glsl-explicit-location-03.c
@@ -48,7 +48,7 @@ void piglit_init(int argc, char **argv)
GLint prog;
GLboolean ok;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-explicit-location-04.c b/tests/shaders/glsl-explicit-location-04.c
index c1ae761f1..fbd31ac3d 100644
--- a/tests/shaders/glsl-explicit-location-04.c
+++ b/tests/shaders/glsl-explicit-location-04.c
@@ -45,7 +45,7 @@ void piglit_init(int argc, char **argv)
GLint prog;
GLboolean ok;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-explicit-location-05.c b/tests/shaders/glsl-explicit-location-05.c
index 75474f8d7..fd5808503 100644
--- a/tests/shaders/glsl-explicit-location-05.c
+++ b/tests/shaders/glsl-explicit-location-05.c
@@ -50,7 +50,7 @@ void piglit_init(int argc, char **argv)
GLboolean ok;
GLint loc;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-bug25902.c b/tests/shaders/glsl-fs-bug25902.c
index cdb29ebda..4d1bbf4ad 100644
--- a/tests/shaders/glsl-fs-bug25902.c
+++ b/tests/shaders/glsl-fs-bug25902.c
@@ -72,7 +72,7 @@ piglit_init(int argc, char **argv)
float black[4] = {0.0, 0.0, 0.0, 0.0};
float white[4] = {1.0, 1.0, 1.0, 0.0};
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-exp2.c b/tests/shaders/glsl-fs-exp2.c
index f76e2da55..55d8bedcc 100644
--- a/tests/shaders/glsl-fs-exp2.c
+++ b/tests/shaders/glsl-fs-exp2.c
@@ -66,7 +66,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-flat-color.c b/tests/shaders/glsl-fs-flat-color.c
index 9f275f2e6..6f2cf245c 100644
--- a/tests/shaders/glsl-fs-flat-color.c
+++ b/tests/shaders/glsl-fs-flat-color.c
@@ -94,7 +94,7 @@ piglit_init(int argc, char **argv)
{
GLuint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-fogcolor-statechange.c b/tests/shaders/glsl-fs-fogcolor-statechange.c
index e625eaa59..c86504368 100644
--- a/tests/shaders/glsl-fs-fogcolor-statechange.c
+++ b/tests/shaders/glsl-fs-fogcolor-statechange.c
@@ -70,7 +70,7 @@ piglit_init(int argc, char **argv)
" gl_FragColor = gl_Fog.color;\n"
"}\n";
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-fragcoord-zw-ortho.c b/tests/shaders/glsl-fs-fragcoord-zw-ortho.c
index e7d699271..7b15fb58a 100644
--- a/tests/shaders/glsl-fs-fragcoord-zw-ortho.c
+++ b/tests/shaders/glsl-fs-fragcoord-zw-ortho.c
@@ -114,7 +114,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs, prog;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-fragcoord-zw-perspective.c b/tests/shaders/glsl-fs-fragcoord-zw-perspective.c
index 8b23079b4..352e9e9aa 100644
--- a/tests/shaders/glsl-fs-fragcoord-zw-perspective.c
+++ b/tests/shaders/glsl-fs-fragcoord-zw-perspective.c
@@ -135,7 +135,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs, prog;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-fragcoord.c b/tests/shaders/glsl-fs-fragcoord.c
index 47555e31f..e00efc830 100644
--- a/tests/shaders/glsl-fs-fragcoord.c
+++ b/tests/shaders/glsl-fs-fragcoord.c
@@ -72,7 +72,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-loop-nested.c b/tests/shaders/glsl-fs-loop-nested.c
index e984c264f..d458ce729 100644
--- a/tests/shaders/glsl-fs-loop-nested.c
+++ b/tests/shaders/glsl-fs-loop-nested.c
@@ -104,7 +104,7 @@ piglit_init(int argc, char **argv)
*/
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-loop.c b/tests/shaders/glsl-fs-loop.c
index e8c6ff0e5..b7634d73e 100644
--- a/tests/shaders/glsl-fs-loop.c
+++ b/tests/shaders/glsl-fs-loop.c
@@ -102,7 +102,7 @@ piglit_init(int argc, char **argv)
*/
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-mix-constant.c b/tests/shaders/glsl-fs-mix-constant.c
index 2f2fa76d6..e2482e4c8 100644
--- a/tests/shaders/glsl-fs-mix-constant.c
+++ b/tests/shaders/glsl-fs-mix-constant.c
@@ -61,7 +61,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-mix.c b/tests/shaders/glsl-fs-mix.c
index 680061043..ed77b38b5 100644
--- a/tests/shaders/glsl-fs-mix.c
+++ b/tests/shaders/glsl-fs-mix.c
@@ -68,7 +68,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-pointcoord.c b/tests/shaders/glsl-fs-pointcoord.c
index f253103af..586789f4c 100644
--- a/tests/shaders/glsl-fs-pointcoord.c
+++ b/tests/shaders/glsl-fs-pointcoord.c
@@ -92,7 +92,7 @@ void piglit_init(int argc, char**argv)
GLint vs, fs;
GLint point_size_limits[2];
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
exit(1);
diff --git a/tests/shaders/glsl-fs-raytrace-bug27060.c b/tests/shaders/glsl-fs-raytrace-bug27060.c
index 2bc986ffd..cfd87c84c 100644
--- a/tests/shaders/glsl-fs-raytrace-bug27060.c
+++ b/tests/shaders/glsl-fs-raytrace-bug27060.c
@@ -280,7 +280,7 @@ piglit_init(int argc, char **argv)
glDisable(GL_DEPTH_TEST);
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-sampler-numbering.c b/tests/shaders/glsl-fs-sampler-numbering.c
index c3e8b9531..1fe89cd36 100644
--- a/tests/shaders/glsl-fs-sampler-numbering.c
+++ b/tests/shaders/glsl-fs-sampler-numbering.c
@@ -72,7 +72,7 @@ piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-shader-stencil-export.c b/tests/shaders/glsl-fs-shader-stencil-export.c
index 70d947f62..10590ce84 100644
--- a/tests/shaders/glsl-fs-shader-stencil-export.c
+++ b/tests/shaders/glsl-fs-shader-stencil-export.c
@@ -65,7 +65,7 @@ piglit_init(int argc, char **argv)
GLint vs, fs;
piglit_require_extension("GL_ARB_shader_stencil_export");
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-sqrt-branch.c b/tests/shaders/glsl-fs-sqrt-branch.c
index 054909bd0..c289be409 100644
--- a/tests/shaders/glsl-fs-sqrt-branch.c
+++ b/tests/shaders/glsl-fs-sqrt-branch.c
@@ -66,7 +66,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-sqrt-zero.c b/tests/shaders/glsl-fs-sqrt-zero.c
index 512625e0a..aa74e7a33 100644
--- a/tests/shaders/glsl-fs-sqrt-zero.c
+++ b/tests/shaders/glsl-fs-sqrt-zero.c
@@ -60,7 +60,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-texture2drect.c b/tests/shaders/glsl-fs-texture2drect.c
index 364ea2472..7dadbf3af 100644
--- a/tests/shaders/glsl-fs-texture2drect.c
+++ b/tests/shaders/glsl-fs-texture2drect.c
@@ -138,7 +138,7 @@ void piglit_init(int argc, char **argv)
proj4 = GL_TRUE;
}
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-texturecube-2.c b/tests/shaders/glsl-fs-texturecube-2.c
index 7f409ce18..b86c35a03 100644
--- a/tests/shaders/glsl-fs-texturecube-2.c
+++ b/tests/shaders/glsl-fs-texturecube-2.c
@@ -201,7 +201,7 @@ void piglit_init(int argc, char **argv)
bias = GL_TRUE;
}
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-texturecube.c b/tests/shaders/glsl-fs-texturecube.c
index 58809451e..6bc452a17 100644
--- a/tests/shaders/glsl-fs-texturecube.c
+++ b/tests/shaders/glsl-fs-texturecube.c
@@ -165,7 +165,7 @@ void piglit_init(int argc, char **argv)
bias = GL_TRUE;
}
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-textureenvcolor-statechange.c b/tests/shaders/glsl-fs-textureenvcolor-statechange.c
index ba17f6d89..82281b092 100644
--- a/tests/shaders/glsl-fs-textureenvcolor-statechange.c
+++ b/tests/shaders/glsl-fs-textureenvcolor-statechange.c
@@ -70,7 +70,7 @@ piglit_init(int argc, char **argv)
" gl_FragColor = gl_TextureEnvColor[0];\n"
"}\n";
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-texturelod-01.c b/tests/shaders/glsl-fs-texturelod-01.c
index 0dc88f0ec..25313dca2 100644
--- a/tests/shaders/glsl-fs-texturelod-01.c
+++ b/tests/shaders/glsl-fs-texturelod-01.c
@@ -125,7 +125,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs, prog, sampler_uniform;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fs-user-varying-ff.c b/tests/shaders/glsl-fs-user-varying-ff.c
index dc62e7359..3853066f3 100644
--- a/tests/shaders/glsl-fs-user-varying-ff.c
+++ b/tests/shaders/glsl-fs-user-varying-ff.c
@@ -71,7 +71,7 @@ piglit_init(int argc, char **argv)
{
GLuint fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-fwidth.c b/tests/shaders/glsl-fwidth.c
index a8a301f10..659d2140c 100644
--- a/tests/shaders/glsl-fwidth.c
+++ b/tests/shaders/glsl-fwidth.c
@@ -84,7 +84,7 @@ static const char *fragShaderText2 =
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-getactiveuniform-array-size.c b/tests/shaders/glsl-getactiveuniform-array-size.c
index d8b8daba6..de8c39268 100644
--- a/tests/shaders/glsl-getactiveuniform-array-size.c
+++ b/tests/shaders/glsl-getactiveuniform-array-size.c
@@ -53,7 +53,7 @@ piglit_init(int argc, char **argv)
GLsizei size;
GLenum type;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-getactiveuniform-length.c b/tests/shaders/glsl-getactiveuniform-length.c
index be834d426..b4a2ffbb9 100644
--- a/tests/shaders/glsl-getactiveuniform-length.c
+++ b/tests/shaders/glsl-getactiveuniform-length.c
@@ -54,7 +54,7 @@ piglit_init(int argc, char **argv)
char *name;
GLsizei size;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-getattriblocation.c b/tests/shaders/glsl-getattriblocation.c
index 80c3de548..c5d554b5f 100644
--- a/tests/shaders/glsl-getattriblocation.c
+++ b/tests/shaders/glsl-getattriblocation.c
@@ -114,7 +114,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
exit(1);
diff --git a/tests/shaders/glsl-invalid-asm-01.c b/tests/shaders/glsl-invalid-asm-01.c
index 92392da71..a6686bd20 100644
--- a/tests/shaders/glsl-invalid-asm-01.c
+++ b/tests/shaders/glsl-invalid-asm-01.c
@@ -76,7 +76,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLenum err;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-invalid-asm-02.c b/tests/shaders/glsl-invalid-asm-02.c
index c37ed8d11..b36a50ca4 100644
--- a/tests/shaders/glsl-invalid-asm-02.c
+++ b/tests/shaders/glsl-invalid-asm-02.c
@@ -75,7 +75,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLenum err;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-kwin-blur-1.c b/tests/shaders/glsl-kwin-blur-1.c
index b29ce9b2e..8f4899396 100644
--- a/tests/shaders/glsl-kwin-blur-1.c
+++ b/tests/shaders/glsl-kwin-blur-1.c
@@ -227,7 +227,7 @@ enum piglit_result piglit_display(void)
void piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-kwin-blur-2.c b/tests/shaders/glsl-kwin-blur-2.c
index 04cda317c..7c57e626d 100644
--- a/tests/shaders/glsl-kwin-blur-2.c
+++ b/tests/shaders/glsl-kwin-blur-2.c
@@ -258,7 +258,7 @@ void piglit_init(int argc, char **argv)
{
int value;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-light-model.c b/tests/shaders/glsl-light-model.c
index 928e6d61e..c785a3e71 100644
--- a/tests/shaders/glsl-light-model.c
+++ b/tests/shaders/glsl-light-model.c
@@ -66,7 +66,7 @@ piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-link-bug30552.c b/tests/shaders/glsl-link-bug30552.c
index ee08803e6..0d9ad6266 100644
--- a/tests/shaders/glsl-link-bug30552.c
+++ b/tests/shaders/glsl-link-bug30552.c
@@ -44,7 +44,7 @@ void piglit_init(int argc, char **argv)
GLint prog;
GLboolean ok;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-link-bug38015.c b/tests/shaders/glsl-link-bug38015.c
index e34d59038..ca31e6dad 100644
--- a/tests/shaders/glsl-link-bug38015.c
+++ b/tests/shaders/glsl-link-bug38015.c
@@ -56,7 +56,7 @@ void piglit_init(int argc, char **argv)
GLint prog;
const char *fs_text_ptr = fs_text;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-link-empty-prog-01.c b/tests/shaders/glsl-link-empty-prog-01.c
index 1c44884e9..de8ffce94 100644
--- a/tests/shaders/glsl-link-empty-prog-01.c
+++ b/tests/shaders/glsl-link-empty-prog-01.c
@@ -45,7 +45,7 @@ enum piglit_result piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-link-empty-prog-02.c b/tests/shaders/glsl-link-empty-prog-02.c
index d9a1789eb..8ab049040 100644
--- a/tests/shaders/glsl-link-empty-prog-02.c
+++ b/tests/shaders/glsl-link-empty-prog-02.c
@@ -88,7 +88,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-link-initializer-03.c b/tests/shaders/glsl-link-initializer-03.c
index e43548c25..4ddd05bdc 100644
--- a/tests/shaders/glsl-link-initializer-03.c
+++ b/tests/shaders/glsl-link-initializer-03.c
@@ -54,7 +54,7 @@ void piglit_init(int argc, char **argv)
GLint prog_c;
GLint prog_d;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-link-test.c b/tests/shaders/glsl-link-test.c
index a614c7f5e..909d3b21e 100644
--- a/tests/shaders/glsl-link-test.c
+++ b/tests/shaders/glsl-link-test.c
@@ -47,7 +47,7 @@ void piglit_init(int argc, char **argv)
unsigned i;
const char *invalid_file = NULL;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
@@ -83,7 +83,7 @@ void piglit_init(int argc, char **argv)
target = GL_VERTEX_SHADER;
} else if (strcmp(argv[i] + len - 5, ".geom") == 0) {
target = GL_GEOMETRY_SHADER;
- if (!GLEW_VERSION_3_2 && !GLEW_ARB_geometry_shader4) {
+ if (piglit_get_gl_version() < 32 && !GLEW_ARB_geometry_shader4) {
printf("Requires geometry shaders.\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-lod-bias.c b/tests/shaders/glsl-lod-bias.c
index 9de328a87..96dac05b2 100644
--- a/tests/shaders/glsl-lod-bias.c
+++ b/tests/shaders/glsl-lod-bias.c
@@ -79,7 +79,7 @@ static const float pink[4] = {1.0, 0.0, 1.0, 0.0}; /* Note: 0.0 alpha */
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-mat-attribute.c b/tests/shaders/glsl-mat-attribute.c
index 16634ca4d..07d5dbb94 100644
--- a/tests/shaders/glsl-mat-attribute.c
+++ b/tests/shaders/glsl-mat-attribute.c
@@ -198,7 +198,7 @@ void piglit_init(int argc, char **argv)
unsigned i;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-max-varyings.c b/tests/shaders/glsl-max-varyings.c
index 4592c87ee..40b232f9a 100644
--- a/tests/shaders/glsl-max-varyings.c
+++ b/tests/shaders/glsl-max-varyings.c
@@ -258,7 +258,7 @@ piglit_display(void)
void piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-max-vertex-attrib.c b/tests/shaders/glsl-max-vertex-attrib.c
index 666c2a1e4..e247a13ce 100644
--- a/tests/shaders/glsl-max-vertex-attrib.c
+++ b/tests/shaders/glsl-max-vertex-attrib.c
@@ -150,7 +150,7 @@ enum piglit_result piglit_display(void)
void piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
exit(1);
diff --git a/tests/shaders/glsl-novertexdata.c b/tests/shaders/glsl-novertexdata.c
index b73476446..16a524786 100644
--- a/tests/shaders/glsl-novertexdata.c
+++ b/tests/shaders/glsl-novertexdata.c
@@ -102,7 +102,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
exit(1);
diff --git a/tests/shaders/glsl-orangebook-ch06-bump.c b/tests/shaders/glsl-orangebook-ch06-bump.c
index e712286c7..f47a36e02 100644
--- a/tests/shaders/glsl-orangebook-ch06-bump.c
+++ b/tests/shaders/glsl-orangebook-ch06-bump.c
@@ -101,7 +101,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-preprocessor-comments.c b/tests/shaders/glsl-preprocessor-comments.c
index 9684576cf..37fbb1c5b 100644
--- a/tests/shaders/glsl-preprocessor-comments.c
+++ b/tests/shaders/glsl-preprocessor-comments.c
@@ -66,7 +66,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-routing.c b/tests/shaders/glsl-routing.c
index 6194f6028..52d441053 100644
--- a/tests/shaders/glsl-routing.c
+++ b/tests/shaders/glsl-routing.c
@@ -318,7 +318,7 @@ void piglit_init(int argc, char **argv)
{
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-sin.c b/tests/shaders/glsl-sin.c
index 4c760fcb8..76cbed119 100644
--- a/tests/shaders/glsl-sin.c
+++ b/tests/shaders/glsl-sin.c
@@ -109,7 +109,7 @@ enum piglit_result piglit_display(void)
void piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-uniform-update.c b/tests/shaders/glsl-uniform-update.c
index 18bdad732..1a0a853a1 100644
--- a/tests/shaders/glsl-uniform-update.c
+++ b/tests/shaders/glsl-uniform-update.c
@@ -73,7 +73,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-unused-varying.c b/tests/shaders/glsl-unused-varying.c
index 93f41292a..2a7456006 100644
--- a/tests/shaders/glsl-unused-varying.c
+++ b/tests/shaders/glsl-unused-varying.c
@@ -75,7 +75,7 @@ void piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-useprogram-displaylist.c b/tests/shaders/glsl-useprogram-displaylist.c
index 616c28536..56fb0e9d6 100644
--- a/tests/shaders/glsl-useprogram-displaylist.c
+++ b/tests/shaders/glsl-useprogram-displaylist.c
@@ -54,7 +54,7 @@ piglit_init(int argc, char **argv)
GLint fsg;
GLint vs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-vs-arrays.c b/tests/shaders/glsl-vs-arrays.c
index c587e096a..972e3a235 100644
--- a/tests/shaders/glsl-vs-arrays.c
+++ b/tests/shaders/glsl-vs-arrays.c
@@ -62,7 +62,7 @@ void piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-vs-functions.c b/tests/shaders/glsl-vs-functions.c
index 97a40a514..994101098 100644
--- a/tests/shaders/glsl-vs-functions.c
+++ b/tests/shaders/glsl-vs-functions.c
@@ -64,7 +64,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-vs-if-bool.c b/tests/shaders/glsl-vs-if-bool.c
index 0b512f655..289b04f8a 100644
--- a/tests/shaders/glsl-vs-if-bool.c
+++ b/tests/shaders/glsl-vs-if-bool.c
@@ -65,7 +65,7 @@ void piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-vs-loop-nested.c b/tests/shaders/glsl-vs-loop-nested.c
index 2d59c6183..1c557c2ba 100644
--- a/tests/shaders/glsl-vs-loop-nested.c
+++ b/tests/shaders/glsl-vs-loop-nested.c
@@ -103,7 +103,7 @@ piglit_init(int argc, char **argv)
*/
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-vs-loop.c b/tests/shaders/glsl-vs-loop.c
index 67a625e06..86ad11bc0 100644
--- a/tests/shaders/glsl-vs-loop.c
+++ b/tests/shaders/glsl-vs-loop.c
@@ -102,7 +102,7 @@ piglit_init(int argc, char **argv)
*/
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-vs-mov-after-deref.c b/tests/shaders/glsl-vs-mov-after-deref.c
index 447b70c75..968ce318d 100644
--- a/tests/shaders/glsl-vs-mov-after-deref.c
+++ b/tests/shaders/glsl-vs-mov-after-deref.c
@@ -62,7 +62,7 @@ void piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-vs-mvp-statechange.c b/tests/shaders/glsl-vs-mvp-statechange.c
index 6f3a7f9e7..54bc02eaf 100644
--- a/tests/shaders/glsl-vs-mvp-statechange.c
+++ b/tests/shaders/glsl-vs-mvp-statechange.c
@@ -72,7 +72,7 @@ piglit_init(int argc, char **argv)
" gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0);\n"
"}\n";
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-vs-normalscale.c b/tests/shaders/glsl-vs-normalscale.c
index 30b0031c8..d8e1b444b 100644
--- a/tests/shaders/glsl-vs-normalscale.c
+++ b/tests/shaders/glsl-vs-normalscale.c
@@ -67,7 +67,7 @@ void piglit_init(int argc, char **argv)
GLint vs, fs;
int loc;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-vs-point-size.c b/tests/shaders/glsl-vs-point-size.c
index 5b7fc1d0b..c8d9f066b 100644
--- a/tests/shaders/glsl-vs-point-size.c
+++ b/tests/shaders/glsl-vs-point-size.c
@@ -85,7 +85,7 @@ piglit_init(int argc, char **argv)
GLint vs;
GLint point_size_range[2];
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-vs-raytrace-bug26691.c b/tests/shaders/glsl-vs-raytrace-bug26691.c
index 22fd9905f..2e919a350 100644
--- a/tests/shaders/glsl-vs-raytrace-bug26691.c
+++ b/tests/shaders/glsl-vs-raytrace-bug26691.c
@@ -271,7 +271,7 @@ piglit_init(int argc, char **argv)
glDisable(GL_DEPTH_TEST);
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-vs-sqrt-zero.c b/tests/shaders/glsl-vs-sqrt-zero.c
index 2794c1416..85f2efc4f 100644
--- a/tests/shaders/glsl-vs-sqrt-zero.c
+++ b/tests/shaders/glsl-vs-sqrt-zero.c
@@ -60,7 +60,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-vs-statechange-1.c b/tests/shaders/glsl-vs-statechange-1.c
index 59f547371..599b8524c 100644
--- a/tests/shaders/glsl-vs-statechange-1.c
+++ b/tests/shaders/glsl-vs-statechange-1.c
@@ -77,7 +77,7 @@ piglit_init(int argc, char **argv)
{
GLint vs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-vs-texturematrix-1.c b/tests/shaders/glsl-vs-texturematrix-1.c
index d46c63e60..eb30590b4 100644
--- a/tests/shaders/glsl-vs-texturematrix-1.c
+++ b/tests/shaders/glsl-vs-texturematrix-1.c
@@ -82,7 +82,7 @@ void piglit_init(int argc, char **argv)
GLint vs, fs;
int loc;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-vs-texturematrix-2.c b/tests/shaders/glsl-vs-texturematrix-2.c
index 1efe26143..56b734bd1 100644
--- a/tests/shaders/glsl-vs-texturematrix-2.c
+++ b/tests/shaders/glsl-vs-texturematrix-2.c
@@ -84,7 +84,7 @@ void piglit_init(int argc, char **argv)
GLint vs, fs;
int loc;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/glsl-vs-user-varying-ff.c b/tests/shaders/glsl-vs-user-varying-ff.c
index 1fdb30d6f..1448d160b 100644
--- a/tests/shaders/glsl-vs-user-varying-ff.c
+++ b/tests/shaders/glsl-vs-user-varying-ff.c
@@ -69,7 +69,7 @@ piglit_init(int argc, char **argv)
{
GLuint vs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/link-mismatch-layout-01.c b/tests/shaders/link-mismatch-layout-01.c
index ec0de6de8..e1d0f8fd9 100644
--- a/tests/shaders/link-mismatch-layout-01.c
+++ b/tests/shaders/link-mismatch-layout-01.c
@@ -66,7 +66,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLuint fs[2];
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/link-mismatch-layout-02.c b/tests/shaders/link-mismatch-layout-02.c
index 063646dba..ced3a1686 100644
--- a/tests/shaders/link-mismatch-layout-02.c
+++ b/tests/shaders/link-mismatch-layout-02.c
@@ -66,7 +66,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLuint fs[2];
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/link-mismatch-layout-03.c b/tests/shaders/link-mismatch-layout-03.c
index 77d2c823f..ea47ed680 100644
--- a/tests/shaders/link-mismatch-layout-03.c
+++ b/tests/shaders/link-mismatch-layout-03.c
@@ -64,7 +64,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLuint fs[2];
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/link-unresolved-function.c b/tests/shaders/link-unresolved-function.c
index a255b287e..62ffb5d65 100644
--- a/tests/shaders/link-unresolved-function.c
+++ b/tests/shaders/link-unresolved-function.c
@@ -49,7 +49,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLuint vs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/sso-simple.c b/tests/shaders/sso-simple.c
index 99a77f946..aa6397c21 100644
--- a/tests/shaders/sso-simple.c
+++ b/tests/shaders/sso-simple.c
@@ -106,7 +106,7 @@ piglit_init(int argc, char **argv)
GLuint vs;
GLuint fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/sso-uniforms-01.c b/tests/shaders/sso-uniforms-01.c
index 100390bfe..23c86da42 100644
--- a/tests/shaders/sso-uniforms-01.c
+++ b/tests/shaders/sso-uniforms-01.c
@@ -79,7 +79,7 @@ piglit_init(int argc, char **argv)
{
GLint loc;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/sso-uniforms-02.c b/tests/shaders/sso-uniforms-02.c
index d335a2289..9157eca75 100644
--- a/tests/shaders/sso-uniforms-02.c
+++ b/tests/shaders/sso-uniforms-02.c
@@ -78,7 +78,7 @@ piglit_init(int argc, char **argv)
{
GLint loc;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/sso-user-varying-01.c b/tests/shaders/sso-user-varying-01.c
index 29c355f6e..c8203e32f 100644
--- a/tests/shaders/sso-user-varying-01.c
+++ b/tests/shaders/sso-user-varying-01.c
@@ -84,7 +84,7 @@ piglit_init(int argc, char **argv)
GLuint vs;
GLuint fs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/sso-user-varying-02.c b/tests/shaders/sso-user-varying-02.c
index abdc90bba..d1a9a9d52 100644
--- a/tests/shaders/sso-user-varying-02.c
+++ b/tests/shaders/sso-user-varying-02.c
@@ -82,7 +82,7 @@ piglit_init(int argc, char **argv)
{
GLboolean try_to_render;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/trinity-fp1.c b/tests/shaders/trinity-fp1.c
index 88d009d73..4180d0c3c 100644
--- a/tests/shaders/trinity-fp1.c
+++ b/tests/shaders/trinity-fp1.c
@@ -227,7 +227,7 @@ piglit_init(int argc, char **argv)
"END";
- if (!GLEW_VERSION_1_3) {
+ if (piglit_get_gl_version() < 13) {
printf("Requires OpenGL 1.3\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/useprogram-flushverts-1.c b/tests/shaders/useprogram-flushverts-1.c
index b4ed7c746..b7bd0bfd1 100644
--- a/tests/shaders/useprogram-flushverts-1.c
+++ b/tests/shaders/useprogram-flushverts-1.c
@@ -111,7 +111,7 @@ piglit_init(int argc, char **argv)
" gl_FragColor = vec4(0.0, 0.0, 1.0, 0.0);\n"
"}\n";
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/useprogram-flushverts-2.c b/tests/shaders/useprogram-flushverts-2.c
index 7ed71af95..984b2eb87 100644
--- a/tests/shaders/useprogram-flushverts-2.c
+++ b/tests/shaders/useprogram-flushverts-2.c
@@ -117,7 +117,7 @@ piglit_init(int argc, char **argv)
" gl_FragColor = vec4(0.0, 0.0, 1.0, 0.0);\n"
"}\n";
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/useprogram-inside-begin.c b/tests/shaders/useprogram-inside-begin.c
index f9bc974d7..ac936fab8 100644
--- a/tests/shaders/useprogram-inside-begin.c
+++ b/tests/shaders/useprogram-inside-begin.c
@@ -53,7 +53,7 @@ piglit_init(int argc, char **argv)
GLint vs;
GLenum err;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/useprogram-refcount-1.c b/tests/shaders/useprogram-refcount-1.c
index a52d1f192..daf96ee3e 100644
--- a/tests/shaders/useprogram-refcount-1.c
+++ b/tests/shaders/useprogram-refcount-1.c
@@ -80,7 +80,7 @@ piglit_init(int argc, char **argv)
" gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0);\n"
"}\n";
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/useshaderprogram-bad-program.c b/tests/shaders/useshaderprogram-bad-program.c
index 4318f6be6..512c85129 100644
--- a/tests/shaders/useshaderprogram-bad-program.c
+++ b/tests/shaders/useshaderprogram-bad-program.c
@@ -54,7 +54,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLuint vs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/useshaderprogram-bad-type.c b/tests/shaders/useshaderprogram-bad-type.c
index 150406a72..55a5af329 100644
--- a/tests/shaders/useshaderprogram-bad-type.c
+++ b/tests/shaders/useshaderprogram-bad-type.c
@@ -79,7 +79,7 @@ piglit_init(int argc, char **argv)
? 0 : GL_INVALID_ENUM;
GLboolean pass;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/useshaderprogram-flushverts-1.c b/tests/shaders/useshaderprogram-flushverts-1.c
index 99410db25..58e418ea3 100644
--- a/tests/shaders/useshaderprogram-flushverts-1.c
+++ b/tests/shaders/useshaderprogram-flushverts-1.c
@@ -113,7 +113,7 @@ piglit_init(int argc, char **argv)
" gl_FragColor = vec4(0.0, 0.0, 1.0, 0.0);\n"
"}\n";
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/vp-ignore-input.c b/tests/shaders/vp-ignore-input.c
index d32e25a3b..2e0caa021 100644
--- a/tests/shaders/vp-ignore-input.c
+++ b/tests/shaders/vp-ignore-input.c
@@ -71,7 +71,7 @@ piglit_init(int argc, char **argv)
glClearColor(0.2, 0.2, 0.2, 1.0);
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/shaders/vpfp-generic.cpp b/tests/shaders/vpfp-generic.cpp
index 8979d4201..58404d44a 100644
--- a/tests/shaders/vpfp-generic.cpp
+++ b/tests/shaders/vpfp-generic.cpp
@@ -403,7 +403,7 @@ extern "C" void piglit_init(int argc, char **argv)
fp = tests.fragment_program_code.c_str();
- if (!GLEW_VERSION_1_3) {
+ if (piglit_get_gl_version() < 13) {
printf("Requires OpenGL 1.3\n");
piglit_report_result(PIGLIT_SKIP);
exit(1);
diff --git a/tests/spec/arb_copy_buffer/copy_buffer_coherency.c b/tests/spec/arb_copy_buffer/copy_buffer_coherency.c
index 8781324f4..04c4a1184 100644
--- a/tests/spec/arb_copy_buffer/copy_buffer_coherency.c
+++ b/tests/spec/arb_copy_buffer/copy_buffer_coherency.c
@@ -69,7 +69,7 @@ do_copy()
void
piglit_init(int argc, char *argv[])
{
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
printf("Requires OpenGL 1.5\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-fixed-type.c b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-fixed-type.c
index 6f3ff99ab..512856598 100644
--- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-fixed-type.c
+++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-fixed-type.c
@@ -81,7 +81,7 @@ piglit_init(int argc, char **argv)
GLuint vs, prog;
int i,j;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-getshaderprecisionformat.c b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-getshaderprecisionformat.c
index c09590692..5993951d5 100644
--- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-getshaderprecisionformat.c
+++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-getshaderprecisionformat.c
@@ -69,7 +69,7 @@ piglit_init(int argc, char **argv)
{ GL_HIGH_INT, { 16, 16 }, 0 }
};
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-maxvectors.c b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-maxvectors.c
index 1dfeb060d..7a1b3d8d7 100644
--- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-maxvectors.c
+++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-maxvectors.c
@@ -44,7 +44,7 @@ piglit_init(int argc, char **argv)
GLboolean pass = GL_TRUE;
GLint floats, vecs;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c
index eca6b9b3e..05f5f74ae 100644
--- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c
+++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c
@@ -121,7 +121,7 @@ piglit_init(int argc, char **argv)
+0.0, -1.0, 0.0, 1.0,
};
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-shadercompiler.c b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-shadercompiler.c
index c7febf8b2..7fd5d2bc9 100644
--- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-shadercompiler.c
+++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-shadercompiler.c
@@ -44,7 +44,7 @@ piglit_init(int argc, char **argv)
#ifdef GL_ARB_ES2_compatibility
GLint shadercompiler;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/arb_map_buffer_range/map_buffer_range_error_check.c b/tests/spec/arb_map_buffer_range/map_buffer_range_error_check.c
index 3b529fcb9..6004bd9bc 100644
--- a/tests/spec/arb_map_buffer_range/map_buffer_range_error_check.c
+++ b/tests/spec/arb_map_buffer_range/map_buffer_range_error_check.c
@@ -45,7 +45,7 @@ piglit_init(int argc, char *argv[])
GLbitfield access = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT;
GLuint buffer;
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
printf("Requires OpenGL 1.5\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/arb_map_buffer_range/map_buffer_range_test.c b/tests/spec/arb_map_buffer_range/map_buffer_range_test.c
index db7824185..d5a1da51c 100644
--- a/tests/spec/arb_map_buffer_range/map_buffer_range_test.c
+++ b/tests/spec/arb_map_buffer_range/map_buffer_range_test.c
@@ -61,7 +61,7 @@ piglit_init(int argc, char *argv[])
int i;
bool ret;
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
printf("Requires OpenGL 1.5\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/arb_robustness/draw-vbo-bounds.c b/tests/spec/arb_robustness/draw-vbo-bounds.c
index 5d1bab2c0..d5753c6fe 100644
--- a/tests/spec/arb_robustness/draw-vbo-bounds.c
+++ b/tests/spec/arb_robustness/draw-vbo-bounds.c
@@ -54,7 +54,7 @@ void piglit_init(int argc, char **argv)
{
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
printf("Requires OpenGL 1.5\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/arb_transform_feedback2/draw-auto.c b/tests/spec/arb_transform_feedback2/draw-auto.c
index 350af30e8..597f3a18b 100644
--- a/tests/spec/arb_transform_feedback2/draw-auto.c
+++ b/tests/spec/arb_transform_feedback2/draw-auto.c
@@ -59,7 +59,7 @@ void piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
/* Check the driver. */
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
fprintf(stderr, "OpenGL 1.5 required.\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c b/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c
index 88517a437..f4dec02e5 100644
--- a/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c
+++ b/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c
@@ -51,7 +51,7 @@ void piglit_init(int argc, char **argv)
{
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
printf("Requires OpenGL 1.5\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/ext_timer_query/time-elapsed.c b/tests/spec/ext_timer_query/time-elapsed.c
index c172ac259..0c6aa10bc 100644
--- a/tests/spec/ext_timer_query/time-elapsed.c
+++ b/tests/spec/ext_timer_query/time-elapsed.c
@@ -245,7 +245,7 @@ retry:
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/ext_transform_feedback/interleaved.c b/tests/spec/ext_transform_feedback/interleaved.c
index 3f84d362c..63087c91d 100644
--- a/tests/spec/ext_transform_feedback/interleaved.c
+++ b/tests/spec/ext_transform_feedback/interleaved.c
@@ -61,7 +61,7 @@ void piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
/* Check the driver. */
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
fprintf(stderr, "OpenGL 1.5 required.\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/ext_transform_feedback/output-type.c b/tests/spec/ext_transform_feedback/output-type.c
index 450a297bb..7b73c2738 100644
--- a/tests/spec/ext_transform_feedback/output-type.c
+++ b/tests/spec/ext_transform_feedback/output-type.c
@@ -1246,7 +1246,7 @@ test_ready:
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
/* Check the driver. */
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
fprintf(stderr, "OpenGL 1.5 required.\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/ext_transform_feedback/position.c b/tests/spec/ext_transform_feedback/position.c
index 51dfc585c..fb4bf99f0 100644
--- a/tests/spec/ext_transform_feedback/position.c
+++ b/tests/spec/ext_transform_feedback/position.c
@@ -99,7 +99,7 @@ void piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
/* Check the driver. */
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
fprintf(stderr, "OpenGL 1.5 required.\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/ext_transform_feedback/separate.c b/tests/spec/ext_transform_feedback/separate.c
index da5bebae0..14a5d33e1 100644
--- a/tests/spec/ext_transform_feedback/separate.c
+++ b/tests/spec/ext_transform_feedback/separate.c
@@ -61,7 +61,7 @@ void piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
/* Check the driver. */
- if (!GLEW_VERSION_1_5) {
+ if (piglit_get_gl_version() < 15) {
fprintf(stderr, "OpenGL 1.5 required.\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/gl-2.0/vertex-program-two-side.c b/tests/spec/gl-2.0/vertex-program-two-side.c
index 500ea7c88..83ede0a50 100644
--- a/tests/spec/gl-2.0/vertex-program-two-side.c
+++ b/tests/spec/gl-2.0/vertex-program-two-side.c
@@ -150,7 +150,7 @@ piglit_init(int argc, char **argv)
piglit_require_GLSL();
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/gl-3.0/required-renderbuffer-attachment-formats.c b/tests/spec/gl-3.0/required-renderbuffer-attachment-formats.c
index c18e9d9b7..9010e8b0f 100644
--- a/tests/spec/gl-3.0/required-renderbuffer-attachment-formats.c
+++ b/tests/spec/gl-3.0/required-renderbuffer-attachment-formats.c
@@ -50,7 +50,7 @@ piglit_init(int argc, char **argv)
GLuint rb, fbo;
int i;
- if (!GLEW_VERSION_3_0) {
+ if (piglit_get_gl_version() < 30) {
printf("Requires GL 3.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/gl-3.0/required-sized-texture-formats.c b/tests/spec/gl-3.0/required-sized-texture-formats.c
index 0780a460f..d00b6400f 100644
--- a/tests/spec/gl-3.0/required-sized-texture-formats.c
+++ b/tests/spec/gl-3.0/required-sized-texture-formats.c
@@ -77,7 +77,7 @@ piglit_init(int argc, char **argv)
GLuint tex;
int i, c;
- if (!GLEW_VERSION_3_0) {
+ if (piglit_get_gl_version() < 30) {
printf("Requires GL 3.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/gl-3.0/required-texture-attachment-formats.c b/tests/spec/gl-3.0/required-texture-attachment-formats.c
index b8de85933..310fc5e01 100644
--- a/tests/spec/gl-3.0/required-texture-attachment-formats.c
+++ b/tests/spec/gl-3.0/required-texture-attachment-formats.c
@@ -50,7 +50,7 @@ piglit_init(int argc, char **argv)
GLuint tex, fbo;
int i, c;
- if (!GLEW_VERSION_3_0) {
+ if (piglit_get_gl_version() < 30) {
printf("Requires GL 3.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/nv_conditional_render/begin-while-active.c b/tests/spec/nv_conditional_render/begin-while-active.c
index 689aecb8a..b5565f51d 100644
--- a/tests/spec/nv_conditional_render/begin-while-active.c
+++ b/tests/spec/nv_conditional_render/begin-while-active.c
@@ -55,7 +55,7 @@ piglit_init(int argc, char **argv)
{
GLuint q;
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/nv_conditional_render/begin-zero.c b/tests/spec/nv_conditional_render/begin-zero.c
index 8218a1d5e..cbe8f2d3b 100644
--- a/tests/spec/nv_conditional_render/begin-zero.c
+++ b/tests/spec/nv_conditional_render/begin-zero.c
@@ -53,7 +53,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/nv_conditional_render/bitmap.c b/tests/spec/nv_conditional_render/bitmap.c
index ca05aaefd..9c5efbe2c 100644
--- a/tests/spec/nv_conditional_render/bitmap.c
+++ b/tests/spec/nv_conditional_render/bitmap.c
@@ -98,7 +98,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/nv_conditional_render/blitframebuffer.c b/tests/spec/nv_conditional_render/blitframebuffer.c
index 1c3feea53..61e72aa39 100644
--- a/tests/spec/nv_conditional_render/blitframebuffer.c
+++ b/tests/spec/nv_conditional_render/blitframebuffer.c
@@ -130,7 +130,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/nv_conditional_render/clear.c b/tests/spec/nv_conditional_render/clear.c
index f2800acef..bec80f454 100644
--- a/tests/spec/nv_conditional_render/clear.c
+++ b/tests/spec/nv_conditional_render/clear.c
@@ -91,7 +91,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/nv_conditional_render/copypixels.c b/tests/spec/nv_conditional_render/copypixels.c
index 93893b9d0..348fd2ab0 100644
--- a/tests/spec/nv_conditional_render/copypixels.c
+++ b/tests/spec/nv_conditional_render/copypixels.c
@@ -94,7 +94,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/nv_conditional_render/copyteximage.c b/tests/spec/nv_conditional_render/copyteximage.c
index 92188b3f4..67234de22 100644
--- a/tests/spec/nv_conditional_render/copyteximage.c
+++ b/tests/spec/nv_conditional_render/copyteximage.c
@@ -115,7 +115,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/nv_conditional_render/copytexsubimage.c b/tests/spec/nv_conditional_render/copytexsubimage.c
index db217763f..3ae84e7cd 100644
--- a/tests/spec/nv_conditional_render/copytexsubimage.c
+++ b/tests/spec/nv_conditional_render/copytexsubimage.c
@@ -115,7 +115,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/nv_conditional_render/dlist.c b/tests/spec/nv_conditional_render/dlist.c
index b640f353e..afc89e77a 100644
--- a/tests/spec/nv_conditional_render/dlist.c
+++ b/tests/spec/nv_conditional_render/dlist.c
@@ -86,7 +86,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/nv_conditional_render/drawpixels.c b/tests/spec/nv_conditional_render/drawpixels.c
index 5e1466154..c65e65c87 100644
--- a/tests/spec/nv_conditional_render/drawpixels.c
+++ b/tests/spec/nv_conditional_render/drawpixels.c
@@ -108,7 +108,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/nv_conditional_render/generatemipmap.c b/tests/spec/nv_conditional_render/generatemipmap.c
index 4496f924b..7fb332ffc 100644
--- a/tests/spec/nv_conditional_render/generatemipmap.c
+++ b/tests/spec/nv_conditional_render/generatemipmap.c
@@ -114,7 +114,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/nv_conditional_render/vertex_array.c b/tests/spec/nv_conditional_render/vertex_array.c
index 4de7fa697..c7ce6ea7b 100644
--- a/tests/spec/nv_conditional_render/vertex_array.c
+++ b/tests/spec/nv_conditional_render/vertex_array.c
@@ -91,7 +91,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/texturing/depth-tex-modes-glsl.c b/tests/texturing/depth-tex-modes-glsl.c
index c57bdb5f0..65c413e2d 100644
--- a/tests/texturing/depth-tex-modes-glsl.c
+++ b/tests/texturing/depth-tex-modes-glsl.c
@@ -80,7 +80,7 @@ static void loadTex(void);
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/texturing/fragment-and-vertex-texturing.c b/tests/texturing/fragment-and-vertex-texturing.c
index 4355df7ea..211b5ef2d 100644
--- a/tests/texturing/fragment-and-vertex-texturing.c
+++ b/tests/texturing/fragment-and-vertex-texturing.c
@@ -178,7 +178,7 @@ piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (!GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() < 20) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/texturing/gen-nonzero-unit.c b/tests/texturing/gen-nonzero-unit.c
index c9d046c91..b60073d81 100644
--- a/tests/texturing/gen-nonzero-unit.c
+++ b/tests/texturing/gen-nonzero-unit.c
@@ -173,7 +173,7 @@ piglit_init(int argc, char **argv)
{
piglit_require_extension("GL_SGIS_generate_mipmap");
- if (GLEW_VERSION_1_3) {
+ if (piglit_get_gl_version() >= 13) {
ActiveTexture = GLEW_GET_FUN(__glewActiveTexture);
} else {
piglit_require_extension("GL_ARB_multitexture");
diff --git a/tests/texturing/lodbias.c b/tests/texturing/lodbias.c
index 641f6d876..4a49e9eb1 100644
--- a/tests/texturing/lodbias.c
+++ b/tests/texturing/lodbias.c
@@ -295,7 +295,7 @@ piglit_init(int argc, char **argv)
{
int i;
- if (!GLEW_VERSION_1_3) {
+ if (piglit_get_gl_version() < 13) {
printf("Requires OpenGL 1.3\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/texturing/tex-miplevel-selection.c b/tests/texturing/tex-miplevel-selection.c
index 1b252e761..c065836f8 100644
--- a/tests/texturing/tex-miplevel-selection.c
+++ b/tests/texturing/tex-miplevel-selection.c
@@ -79,7 +79,7 @@ piglit_init(int argc, char **argv)
}
piglit_require_extension("GL_EXT_framebuffer_object");
- if (!GLEW_VERSION_1_4)
+ if (piglit_get_gl_version() < 14)
piglit_report_result(PIGLIT_SKIP);
if (ARB_shader_texture_lod) {
diff --git a/tests/texturing/tex-skipped-unit.c b/tests/texturing/tex-skipped-unit.c
index 6c964aa33..31d6c1e73 100644
--- a/tests/texturing/tex-skipped-unit.c
+++ b/tests/texturing/tex-skipped-unit.c
@@ -129,7 +129,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_1_2) {
+ if (piglit_get_gl_version() < 12) {
piglit_report_result(PIGLIT_SKIP);
}
}
diff --git a/tests/texturing/tex3d-maxsize.c b/tests/texturing/tex3d-maxsize.c
index dd576e450..e49a2e3bf 100644
--- a/tests/texturing/tex3d-maxsize.c
+++ b/tests/texturing/tex3d-maxsize.c
@@ -192,7 +192,7 @@ static void Reshape(int width, int height)
void piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_1_2) {
+ if (piglit_get_gl_version() < 12) {
printf("Requires OpenGL 1.2\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/texturing/tex3d.c b/tests/texturing/tex3d.c
index 5246b3fa0..42c24a046 100644
--- a/tests/texturing/tex3d.c
+++ b/tests/texturing/tex3d.c
@@ -223,7 +223,7 @@ static void Reshape(int width, int height)
void
piglit_init(int argc, char **argv)
{
- if (!GLEW_VERSION_1_2) {
+ if (piglit_get_gl_version() < 12) {
printf("Requires OpenGL 1.2\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/texturing/texrect-many.c b/tests/texturing/texrect-many.c
index d45d8d875..06c7a96d9 100644
--- a/tests/texturing/texrect-many.c
+++ b/tests/texturing/texrect-many.c
@@ -114,7 +114,7 @@ void piglit_init(int argc, char **argv)
int i;
int maxtextures;
- if (!GLEW_VERSION_1_3) {
+ if (piglit_get_gl_version() < 13) {
printf("Requires OpenGL 1.3\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/util/piglit-framework.c b/tests/util/piglit-framework.c
index 9f209062d..dac04b7f9 100644
--- a/tests/util/piglit-framework.c
+++ b/tests/util/piglit-framework.c
@@ -166,7 +166,7 @@ piglit_framework_fbo_init()
#ifdef USE_OPENGL
glewInit();
- if (!GLEW_VERSION_2_0)
+ if (piglit_get_gl_version() < 20)
return false;
#endif
diff --git a/tests/util/piglit-shader-gl.c b/tests/util/piglit-shader-gl.c
index 352ac8f01..db41a58ea 100644
--- a/tests/util/piglit-shader-gl.c
+++ b/tests/util/piglit-shader-gl.c
@@ -193,7 +193,7 @@ init_functions_from_extension(void)
void
piglit_require_GLSL(void)
{
- if (GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() >= 20) {
init_functions_from_core();
} else if (GLEW_ARB_shader_objects && GLEW_ARB_shading_language_100) {
init_functions_from_extension();
@@ -225,7 +225,7 @@ piglit_require_GLSL_version(int version)
void
piglit_require_vertex_shader(void)
{
- if (GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() >= 20) {
init_functions_from_core();
} else if (GLEW_ARB_shader_objects && GLEW_ARB_vertex_shader) {
init_functions_from_extension();
@@ -239,7 +239,7 @@ piglit_require_vertex_shader(void)
void
piglit_require_fragment_shader(void)
{
- if (GLEW_VERSION_2_0) {
+ if (piglit_get_gl_version() >= 20) {
init_functions_from_core();
} else if (GLEW_ARB_shader_objects && GLEW_ARB_fragment_shader) {
init_functions_from_extension();
diff --git a/tests/util/piglit-transform-feedback.c b/tests/util/piglit-transform-feedback.c
index a200d4968..ba88c5bd1 100644
--- a/tests/util/piglit-transform-feedback.c
+++ b/tests/util/piglit-transform-feedback.c
@@ -69,7 +69,7 @@ init_functions_from_ext(void)
void
piglit_require_transform_feedback(void)
{
- if (GLEW_VERSION_3_0) {
+ if (piglit_get_gl_version() >= 30) {
init_functions_from_core();
} else if (GLEW_EXT_transform_feedback) {
init_functions_from_ext();