summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Forbes <chrisf@ijw.co.nz>2012-09-07 14:20:52 +1200
committerChris Forbes <chrisf@ijw.co.nz>2012-09-10 20:10:29 +1200
commit2b53dc1945dbe58b352d30aa2a6c5ccc53babd7e (patch)
tree3563768333d5f3879f379fd55abdc29e8c2cb6e0 /tests
parent193993238bfb44740618afd7deb9865f361ce992 (diff)
Convert simple if(piglit_get_gl_version() < N) { SKIP } to require
Generated from the following semantic patch: @@ expression VER; expression MSG; @@ - if (piglit_get_gl_version() < VER) { - printf(MSG); - piglit_report_result(PIGLIT_SKIP); ( - exit(1); | ) - } + piglit_require_gl_version(VER); Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/fdo25614-genmipmap.c5
-rw-r--r--tests/bugs/fdo31934.c5
-rw-r--r--tests/fbo/fbo-alphatest-nocolor.c5
-rw-r--r--tests/fbo/fbo-copypix.c5
-rw-r--r--tests/fbo/fbo-drawbuffers-blend-add.c5
-rw-r--r--tests/fbo/fbo-drawbuffers-fragcolor.c5
-rw-r--r--tests/fbo/fbo-drawbuffers-maxtargets.c5
-rw-r--r--tests/fbo/fbo-fragcoord.c5
-rw-r--r--tests/fbo/fbo-fragcoord2.c5
-rw-r--r--tests/fbo/fbo-readdrawpix.c5
-rw-r--r--tests/general/bgra-sec-color-pointer.c5
-rw-r--r--tests/general/bgra-vert-attrib-pointer.c5
-rw-r--r--tests/general/blendminmax.c5
-rw-r--r--tests/general/clear-varray-2.0.c5
-rw-r--r--tests/general/draw-batch.c5
-rw-r--r--tests/general/draw-elements-base-vertex-neg.c5
-rw-r--r--tests/general/draw-elements-vs-inputs.c5
-rw-r--r--tests/general/draw-elements.c5
-rw-r--r--tests/general/draw-vertices-half-float.c5
-rw-r--r--tests/general/draw-vertices.c5
-rw-r--r--tests/general/early-z.c5
-rw-r--r--tests/general/isbufferobj.c5
-rw-r--r--tests/general/occlusion-query-discard.c5
-rw-r--r--tests/general/texunits.c5
-rw-r--r--tests/general/vao-element-array-buffer.c5
-rw-r--r--tests/shaders/activeprogram-bad-program.c5
-rw-r--r--tests/shaders/activeprogram-get.c5
-rw-r--r--tests/shaders/createshaderprogram-attached-shaders.c5
-rw-r--r--tests/shaders/createshaderprogram-bad-type.c5
-rw-r--r--tests/shaders/fp-fragment-position.c5
-rw-r--r--tests/shaders/fp-kil.c5
-rw-r--r--tests/shaders/glsl-arb-fragment-coord-conventions-define.c5
-rw-r--r--tests/shaders/glsl-bindattriblocation.c6
-rw-r--r--tests/shaders/glsl-cos.c5
-rw-r--r--tests/shaders/glsl-deriv-varyings.c5
-rw-r--r--tests/shaders/glsl-derivs.c5
-rw-r--r--tests/shaders/glsl-dlist-getattriblocation.c6
-rw-r--r--tests/shaders/glsl-empty-vs-no-fs.c5
-rw-r--r--tests/shaders/glsl-explicit-location-01.c5
-rw-r--r--tests/shaders/glsl-explicit-location-02.c5
-rw-r--r--tests/shaders/glsl-explicit-location-03.c5
-rw-r--r--tests/shaders/glsl-explicit-location-04.c5
-rw-r--r--tests/shaders/glsl-explicit-location-05.c5
-rw-r--r--tests/shaders/glsl-fs-bug25902.c5
-rw-r--r--tests/shaders/glsl-fs-exp2.c5
-rw-r--r--tests/shaders/glsl-fs-flat-color.c5
-rw-r--r--tests/shaders/glsl-fs-fogcolor-statechange.c5
-rw-r--r--tests/shaders/glsl-fs-fragcoord-zw-ortho.c5
-rw-r--r--tests/shaders/glsl-fs-fragcoord-zw-perspective.c5
-rw-r--r--tests/shaders/glsl-fs-fragcoord.c5
-rw-r--r--tests/shaders/glsl-fs-loop-nested.c5
-rw-r--r--tests/shaders/glsl-fs-loop.c5
-rw-r--r--tests/shaders/glsl-fs-mix-constant.c5
-rw-r--r--tests/shaders/glsl-fs-mix.c5
-rw-r--r--tests/shaders/glsl-fs-pointcoord.c6
-rw-r--r--tests/shaders/glsl-fs-raytrace-bug27060.c5
-rw-r--r--tests/shaders/glsl-fs-sampler-numbering.c5
-rw-r--r--tests/shaders/glsl-fs-shader-stencil-export.c5
-rw-r--r--tests/shaders/glsl-fs-sqrt-branch.c5
-rw-r--r--tests/shaders/glsl-fs-texture2drect.c5
-rw-r--r--tests/shaders/glsl-fs-texturecube-2.c5
-rw-r--r--tests/shaders/glsl-fs-texturecube.c5
-rw-r--r--tests/shaders/glsl-fs-textureenvcolor-statechange.c5
-rw-r--r--tests/shaders/glsl-fs-user-varying-ff.c5
-rw-r--r--tests/shaders/glsl-fwidth.c5
-rw-r--r--tests/shaders/glsl-getactiveuniform-array-size.c5
-rw-r--r--tests/shaders/glsl-getactiveuniform-length.c5
-rw-r--r--tests/shaders/glsl-getattriblocation.c6
-rw-r--r--tests/shaders/glsl-invalid-asm-01.c5
-rw-r--r--tests/shaders/glsl-invalid-asm-02.c5
-rw-r--r--tests/shaders/glsl-kwin-blur-1.c5
-rw-r--r--tests/shaders/glsl-kwin-blur-2.c5
-rw-r--r--tests/shaders/glsl-light-model.c5
-rw-r--r--tests/shaders/glsl-link-bug30552.c5
-rw-r--r--tests/shaders/glsl-link-bug38015.c5
-rw-r--r--tests/shaders/glsl-link-empty-prog-01.c5
-rw-r--r--tests/shaders/glsl-link-empty-prog-02.c5
-rw-r--r--tests/shaders/glsl-link-initializer-03.c5
-rw-r--r--tests/shaders/glsl-link-test.c5
-rw-r--r--tests/shaders/glsl-lod-bias.c5
-rw-r--r--tests/shaders/glsl-mat-attribute.c5
-rw-r--r--tests/shaders/glsl-max-varyings.c5
-rw-r--r--tests/shaders/glsl-max-vertex-attrib.c6
-rw-r--r--tests/shaders/glsl-novertexdata.c6
-rw-r--r--tests/shaders/glsl-orangebook-ch06-bump.c5
-rw-r--r--tests/shaders/glsl-preprocessor-comments.c5
-rw-r--r--tests/shaders/glsl-routing.c5
-rw-r--r--tests/shaders/glsl-sin.c5
-rw-r--r--tests/shaders/glsl-uniform-update.c5
-rw-r--r--tests/shaders/glsl-unused-varying.c5
-rw-r--r--tests/shaders/glsl-useprogram-displaylist.c5
-rw-r--r--tests/shaders/glsl-vs-arrays.c5
-rw-r--r--tests/shaders/glsl-vs-functions.c5
-rw-r--r--tests/shaders/glsl-vs-if-bool.c5
-rw-r--r--tests/shaders/glsl-vs-loop-nested.c5
-rw-r--r--tests/shaders/glsl-vs-loop.c5
-rw-r--r--tests/shaders/glsl-vs-mov-after-deref.c5
-rw-r--r--tests/shaders/glsl-vs-mvp-statechange.c5
-rw-r--r--tests/shaders/glsl-vs-normalscale.c5
-rw-r--r--tests/shaders/glsl-vs-point-size.c5
-rw-r--r--tests/shaders/glsl-vs-raytrace-bug26691.c5
-rw-r--r--tests/shaders/glsl-vs-statechange-1.c5
-rw-r--r--tests/shaders/glsl-vs-texturematrix-1.c5
-rw-r--r--tests/shaders/glsl-vs-texturematrix-2.c5
-rw-r--r--tests/shaders/glsl-vs-user-varying-ff.c5
-rw-r--r--tests/shaders/link-mismatch-layout-01.c5
-rw-r--r--tests/shaders/link-mismatch-layout-02.c5
-rw-r--r--tests/shaders/link-mismatch-layout-03.c5
-rw-r--r--tests/shaders/link-unresolved-function.c5
-rw-r--r--tests/shaders/sso-simple.c5
-rw-r--r--tests/shaders/sso-uniforms-01.c5
-rw-r--r--tests/shaders/sso-uniforms-02.c5
-rw-r--r--tests/shaders/sso-user-varying-01.c5
-rw-r--r--tests/shaders/sso-user-varying-02.c5
-rw-r--r--tests/shaders/trinity-fp1.c5
-rw-r--r--tests/shaders/useprogram-flushverts-1.c5
-rw-r--r--tests/shaders/useprogram-flushverts-2.c5
-rw-r--r--tests/shaders/useprogram-inside-begin.c5
-rw-r--r--tests/shaders/useprogram-refcount-1.c5
-rw-r--r--tests/shaders/useshaderprogram-bad-program.c5
-rw-r--r--tests/shaders/useshaderprogram-bad-type.c5
-rw-r--r--tests/shaders/useshaderprogram-flushverts-1.c5
-rw-r--r--tests/shaders/vp-ignore-input.c5
-rw-r--r--tests/spec/arb_copy_buffer/copy_buffer_coherency.c5
-rw-r--r--tests/spec/arb_es2_compatibility/arb_es2_compatibility-fixed-type.c5
-rw-r--r--tests/spec/arb_es2_compatibility/arb_es2_compatibility-getshaderprecisionformat.c5
-rw-r--r--tests/spec/arb_es2_compatibility/arb_es2_compatibility-maxvectors.c5
-rw-r--r--tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c5
-rw-r--r--tests/spec/arb_es2_compatibility/arb_es2_compatibility-shadercompiler.c5
-rw-r--r--tests/spec/arb_map_buffer_range/map_buffer_range_error_check.c5
-rw-r--r--tests/spec/arb_map_buffer_range/map_buffer_range_test.c5
-rw-r--r--tests/spec/arb_robustness/draw-vbo-bounds.c5
-rw-r--r--tests/spec/arb_timer_query/timestamp-get.c5
-rw-r--r--tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c5
-rw-r--r--tests/spec/ext_timer_query/time-elapsed.c5
-rw-r--r--tests/spec/gl-2.0/vertex-program-two-side.c5
-rw-r--r--tests/spec/gl-3.0/required-renderbuffer-attachment-formats.c5
-rw-r--r--tests/spec/gl-3.0/required-sized-texture-formats.c5
-rw-r--r--tests/spec/gl-3.0/required-texture-attachment-formats.c5
-rw-r--r--tests/spec/nv_conditional_render/begin-while-active.c5
-rw-r--r--tests/spec/nv_conditional_render/begin-zero.c5
-rw-r--r--tests/spec/nv_conditional_render/bitmap.c5
-rw-r--r--tests/spec/nv_conditional_render/blitframebuffer.c5
-rw-r--r--tests/spec/nv_conditional_render/clear.c5
-rw-r--r--tests/spec/nv_conditional_render/copypixels.c5
-rw-r--r--tests/spec/nv_conditional_render/copyteximage.c5
-rw-r--r--tests/spec/nv_conditional_render/copytexsubimage.c5
-rw-r--r--tests/spec/nv_conditional_render/dlist.c5
-rw-r--r--tests/spec/nv_conditional_render/drawpixels.c5
-rw-r--r--tests/spec/nv_conditional_render/generatemipmap.c5
-rw-r--r--tests/spec/nv_conditional_render/vertex_array.c5
-rw-r--r--tests/texturing/depth-tex-modes-glsl.c5
-rw-r--r--tests/texturing/fragment-and-vertex-texturing.c5
-rw-r--r--tests/texturing/lodbias.c5
-rw-r--r--tests/texturing/tex3d-maxsize.c5
-rw-r--r--tests/texturing/tex3d.c5
-rw-r--r--tests/texturing/texrect-many.c5
157 files changed, 157 insertions, 634 deletions
diff --git a/tests/bugs/fdo25614-genmipmap.c b/tests/bugs/fdo25614-genmipmap.c
index 43a7042ef..804ac9b81 100644
--- a/tests/bugs/fdo25614-genmipmap.c
+++ b/tests/bugs/fdo25614-genmipmap.c
@@ -61,10 +61,7 @@ piglit_init(int argc, char **argv)
(void) argc;
(void) argv;
- if (piglit_get_gl_version() < 14) {
- printf("Requires OpenGL 1.4\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(14);
loadTex();
diff --git a/tests/bugs/fdo31934.c b/tests/bugs/fdo31934.c
index c5b8392fa..c1960e3a6 100644
--- a/tests/bugs/fdo31934.c
+++ b/tests/bugs/fdo31934.c
@@ -10,10 +10,7 @@ piglit_init(int argc, char *argv[])
{
GLuint id;
- if (piglit_get_gl_version() < 15) {
- printf("Requires OpenGL 1.5\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(15);
piglit_require_extension("GL_ARB_vertex_buffer_object");
diff --git a/tests/fbo/fbo-alphatest-nocolor.c b/tests/fbo/fbo-alphatest-nocolor.c
index 1794fd2a9..aec409554 100644
--- a/tests/fbo/fbo-alphatest-nocolor.c
+++ b/tests/fbo/fbo-alphatest-nocolor.c
@@ -162,10 +162,7 @@ void piglit_init(int argc, char **argv)
{
GLuint fs, vs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_framebuffer_object");
diff --git a/tests/fbo/fbo-copypix.c b/tests/fbo/fbo-copypix.c
index 7dc0e5954..f34cbf2ca 100644
--- a/tests/fbo/fbo-copypix.c
+++ b/tests/fbo/fbo-copypix.c
@@ -211,10 +211,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 14) {
- printf("Requires OpenGL 1.4\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(14);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/fbo/fbo-drawbuffers-blend-add.c b/tests/fbo/fbo-drawbuffers-blend-add.c
index 76bf32445..158cb9e2a 100644
--- a/tests/fbo/fbo-drawbuffers-blend-add.c
+++ b/tests/fbo/fbo-drawbuffers-blend-add.c
@@ -230,10 +230,7 @@ piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_framebuffer_object");
piglit_require_extension("GL_ARB_draw_buffers");
diff --git a/tests/fbo/fbo-drawbuffers-fragcolor.c b/tests/fbo/fbo-drawbuffers-fragcolor.c
index f93a43770..167855d68 100644
--- a/tests/fbo/fbo-drawbuffers-fragcolor.c
+++ b/tests/fbo/fbo-drawbuffers-fragcolor.c
@@ -179,10 +179,7 @@ piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_framebuffer_object");
piglit_require_extension("GL_ARB_draw_buffers");
diff --git a/tests/fbo/fbo-drawbuffers-maxtargets.c b/tests/fbo/fbo-drawbuffers-maxtargets.c
index e97009852..b3227bfeb 100644
--- a/tests/fbo/fbo-drawbuffers-maxtargets.c
+++ b/tests/fbo/fbo-drawbuffers-maxtargets.c
@@ -187,10 +187,7 @@ piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_framebuffer_object");
piglit_require_extension("GL_ARB_draw_buffers");
diff --git a/tests/fbo/fbo-fragcoord.c b/tests/fbo/fbo-fragcoord.c
index cfd7be2e6..0547b9f3d 100644
--- a/tests/fbo/fbo-fragcoord.c
+++ b/tests/fbo/fbo-fragcoord.c
@@ -141,10 +141,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader(GL_VERTEX_SHADER,
"shaders/glsl-mvp.vert");
diff --git a/tests/fbo/fbo-fragcoord2.c b/tests/fbo/fbo-fragcoord2.c
index 9277e5861..82d439cf1 100644
--- a/tests/fbo/fbo-fragcoord2.c
+++ b/tests/fbo/fbo-fragcoord2.c
@@ -209,10 +209,7 @@ piglit_init(int argc, char**argv)
{
GLuint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_framebuffer_object");
diff --git a/tests/fbo/fbo-readdrawpix.c b/tests/fbo/fbo-readdrawpix.c
index bc0c96fbe..5aa6b3e64 100644
--- a/tests/fbo/fbo-readdrawpix.c
+++ b/tests/fbo/fbo-readdrawpix.c
@@ -214,10 +214,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 14) {
- printf("Requires OpenGL 1.4\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(14);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/general/bgra-sec-color-pointer.c b/tests/general/bgra-sec-color-pointer.c
index 6e5fc1946..7b3821cfe 100644
--- a/tests/general/bgra-sec-color-pointer.c
+++ b/tests/general/bgra-sec-color-pointer.c
@@ -52,10 +52,7 @@ static GLubyte colors[16] = {255, 0, 0, 127,
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 14) {
- printf("Requires OpenGL 1.4\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(14);
piglit_require_extension("GL_EXT_vertex_array_bgra");
diff --git a/tests/general/bgra-vert-attrib-pointer.c b/tests/general/bgra-vert-attrib-pointer.c
index f3703c3f2..54048763d 100644
--- a/tests/general/bgra-vert-attrib-pointer.c
+++ b/tests/general/bgra-vert-attrib-pointer.c
@@ -110,10 +110,7 @@ compileLinkProg(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_vertex_array_bgra");
diff --git a/tests/general/blendminmax.c b/tests/general/blendminmax.c
index c4fc442fb..9f698805c 100644
--- a/tests/general/blendminmax.c
+++ b/tests/general/blendminmax.c
@@ -132,10 +132,7 @@ piglit_init(int argc, char **argv)
piglit_report_result(PIGLIT_SKIP);
}
- if (piglit_get_gl_version() < 14) {
- printf("Requires OpenGL 1.4\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(14);
printf("\nAll 4 quads should be the same color.\n");
glEnable(GL_BLEND);
diff --git a/tests/general/clear-varray-2.0.c b/tests/general/clear-varray-2.0.c
index 697cd3f0a..e13b29cec 100644
--- a/tests/general/clear-varray-2.0.c
+++ b/tests/general/clear-varray-2.0.c
@@ -129,10 +129,7 @@ piglit_init(int argc, char **argv)
{
GLuint vert_prog, frag_prog;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
reshape(piglit_width, piglit_height);
diff --git a/tests/general/draw-batch.c b/tests/general/draw-batch.c
index c21b8b7b9..6c9b105a0 100644
--- a/tests/general/draw-batch.c
+++ b/tests/general/draw-batch.c
@@ -32,10 +32,7 @@ PIGLIT_GL_TEST_MAIN(
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 14) {
- printf("Requires OpenGL 1.4.\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(14);
}
static void rotate_colors(float *array)
diff --git a/tests/general/draw-elements-base-vertex-neg.c b/tests/general/draw-elements-base-vertex-neg.c
index 6e7b260ba..ebb72fc43 100644
--- a/tests/general/draw-elements-base-vertex-neg.c
+++ b/tests/general/draw-elements-base-vertex-neg.c
@@ -46,10 +46,7 @@ void piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 15) {
- printf("Requires OpenGL 1.5\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(15);
piglit_require_extension("GL_ARB_draw_elements_base_vertex");
diff --git a/tests/general/draw-elements-vs-inputs.c b/tests/general/draw-elements-vs-inputs.c
index ff1162694..4c73fff41 100644
--- a/tests/general/draw-elements-vs-inputs.c
+++ b/tests/general/draw-elements-vs-inputs.c
@@ -49,10 +49,7 @@ piglit_init(int argc, char **argv)
{
GLfloat red[4] = {1, 0, 0, 1};
- if (piglit_get_gl_version() < 12) {
- printf("Requires OpenGL 1.2\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(12);
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, red);
diff --git a/tests/general/draw-elements.c b/tests/general/draw-elements.c
index b2bfbd5c0..32cdf9211 100644
--- a/tests/general/draw-elements.c
+++ b/tests/general/draw-elements.c
@@ -51,10 +51,7 @@ void piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 15) {
- printf("Requires OpenGL 1.5\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(15);
glShadeModel(GL_FLAT);
glClearColor(0.2, 0.2, 0.2, 1.0);
diff --git a/tests/general/draw-vertices-half-float.c b/tests/general/draw-vertices-half-float.c
index b81b19c27..c962ebf1c 100644
--- a/tests/general/draw-vertices-half-float.c
+++ b/tests/general/draw-vertices-half-float.c
@@ -51,10 +51,7 @@ void piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 15) {
- printf("Requires OpenGL 1.5\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(15);
piglit_require_extension("GL_ARB_half_float_vertex");
glShadeModel(GL_FLAT);
diff --git a/tests/general/draw-vertices.c b/tests/general/draw-vertices.c
index 03d602e24..70f1bd7fe 100644
--- a/tests/general/draw-vertices.c
+++ b/tests/general/draw-vertices.c
@@ -51,10 +51,7 @@ void piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 15) {
- printf("Requires OpenGL 1.5\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(15);
glShadeModel(GL_FLAT);
glClearColor(0.2, 0.2, 0.2, 1.0);
diff --git a/tests/general/early-z.c b/tests/general/early-z.c
index 036fe5281..99578968c 100644
--- a/tests/general/early-z.c
+++ b/tests/general/early-z.c
@@ -144,10 +144,7 @@ piglit_init(int argc, char **argv)
{
int i;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0 / GLSL\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
shader[0] = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fpFragDepthText);
assert(shader[0]);
diff --git a/tests/general/isbufferobj.c b/tests/general/isbufferobj.c
index 45b3246b7..be2a09007 100644
--- a/tests/general/isbufferobj.c
+++ b/tests/general/isbufferobj.c
@@ -101,8 +101,5 @@ piglit_display(void)
void
piglit_init(int argc, char**argv)
{
- if (piglit_get_gl_version() < 15) {
- printf("Requires OpenGL 1.5\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(15);
}
diff --git a/tests/general/occlusion-query-discard.c b/tests/general/occlusion-query-discard.c
index 4cf3de93d..144f70bca 100644
--- a/tests/general/occlusion-query-discard.c
+++ b/tests/general/occlusion-query-discard.c
@@ -128,10 +128,7 @@ piglit_init(int argc, char **argv)
{
GLint query_bits;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
/* It is legal for a driver to support the query API but not have
* any query bits. I wonder how many applications actually check for
diff --git a/tests/general/texunits.c b/tests/general/texunits.c
index 01264c942..cfe801237 100644
--- a/tests/general/texunits.c
+++ b/tests/general/texunits.c
@@ -384,10 +384,7 @@ init(void)
void
piglit_init(int argc, char *argv[])
{
- if (piglit_get_gl_version() < 13) {
- printf("Requires OpenGL 1.3\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(13);
init();
}
diff --git a/tests/general/vao-element-array-buffer.c b/tests/general/vao-element-array-buffer.c
index 6e9f8c05a..103f24778 100644
--- a/tests/general/vao-element-array-buffer.c
+++ b/tests/general/vao-element-array-buffer.c
@@ -69,10 +69,7 @@ piglit_init(int argc, char **argv)
};
GLubyte indices[] = {0, 1, 2, 3};
- if (piglit_get_gl_version() < 15) {
- printf("Requires OpenGL 1.5\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(15);
piglit_require_extension("GL_ARB_vertex_array_object");
diff --git a/tests/shaders/activeprogram-bad-program.c b/tests/shaders/activeprogram-bad-program.c
index b9160b496..b6bf0431c 100644
--- a/tests/shaders/activeprogram-bad-program.c
+++ b/tests/shaders/activeprogram-bad-program.c
@@ -56,10 +56,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLuint vs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_separate_shader_objects");
diff --git a/tests/shaders/activeprogram-get.c b/tests/shaders/activeprogram-get.c
index bdc701447..cf0d2f931 100644
--- a/tests/shaders/activeprogram-get.c
+++ b/tests/shaders/activeprogram-get.c
@@ -51,10 +51,7 @@ piglit_init(int argc, char **argv)
GLuint got;
GLuint vs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_separate_shader_objects");
diff --git a/tests/shaders/createshaderprogram-attached-shaders.c b/tests/shaders/createshaderprogram-attached-shaders.c
index a1a105f79..d988fdf33 100644
--- a/tests/shaders/createshaderprogram-attached-shaders.c
+++ b/tests/shaders/createshaderprogram-attached-shaders.c
@@ -52,10 +52,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLenum err;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_separate_shader_objects");
diff --git a/tests/shaders/createshaderprogram-bad-type.c b/tests/shaders/createshaderprogram-bad-type.c
index 5eace0878..ab5ba2b3a 100644
--- a/tests/shaders/createshaderprogram-bad-type.c
+++ b/tests/shaders/createshaderprogram-bad-type.c
@@ -112,10 +112,7 @@ piglit_init(int argc, char **argv)
? 0 : GL_INVALID_ENUM;
GLboolean pass;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_separate_shader_objects");
diff --git a/tests/shaders/fp-fragment-position.c b/tests/shaders/fp-fragment-position.c
index b72ac96f2..cc15b77ea 100644
--- a/tests/shaders/fp-fragment-position.c
+++ b/tests/shaders/fp-fragment-position.c
@@ -271,10 +271,7 @@ piglit_init(int argc, char **argv)
GLubyte rectangle[200][200][4];
GLubyte tex[256*256][4];
- if (piglit_get_gl_version() < 13) {
- printf("Requires OpenGL 1.3\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(13);
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
diff --git a/tests/shaders/fp-kil.c b/tests/shaders/fp-kil.c
index cb25e5fe2..297c62871 100644
--- a/tests/shaders/fp-kil.c
+++ b/tests/shaders/fp-kil.c
@@ -240,10 +240,7 @@ piglit_init(int argc, char **argv)
GLuint texname;
GLubyte tex[4][4][4];
- if (piglit_get_gl_version() < 13) {
- printf("Requires OpenGL 1.3\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(13);
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
diff --git a/tests/shaders/glsl-arb-fragment-coord-conventions-define.c b/tests/shaders/glsl-arb-fragment-coord-conventions-define.c
index 42a9c041b..4943ec5ae 100644
--- a/tests/shaders/glsl-arb-fragment-coord-conventions-define.c
+++ b/tests/shaders/glsl-arb-fragment-coord-conventions-define.c
@@ -63,10 +63,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_fragment_coord_conventions");
diff --git a/tests/shaders/glsl-bindattriblocation.c b/tests/shaders/glsl-bindattriblocation.c
index 62b0f13c3..cda840e8e 100644
--- a/tests/shaders/glsl-bindattriblocation.c
+++ b/tests/shaders/glsl-bindattriblocation.c
@@ -127,9 +127,5 @@ piglit_init(int argc, char **argv)
{
piglit_require_vertex_shader();
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- exit(1);
- }
+ piglit_require_gl_version(20);
}
diff --git a/tests/shaders/glsl-cos.c b/tests/shaders/glsl-cos.c
index 3390dcedf..8a9ea5d97 100644
--- a/tests/shaders/glsl-cos.c
+++ b/tests/shaders/glsl-cos.c
@@ -111,9 +111,6 @@ enum piglit_result piglit_display(void)
void piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
}
diff --git a/tests/shaders/glsl-deriv-varyings.c b/tests/shaders/glsl-deriv-varyings.c
index 7a8c81f06..c8f2bbf46 100644
--- a/tests/shaders/glsl-deriv-varyings.c
+++ b/tests/shaders/glsl-deriv-varyings.c
@@ -89,10 +89,7 @@ static const char *fragShaderText2 =
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
compileLinkProg();
diff --git a/tests/shaders/glsl-derivs.c b/tests/shaders/glsl-derivs.c
index 76e926a42..5e25d93c1 100644
--- a/tests/shaders/glsl-derivs.c
+++ b/tests/shaders/glsl-derivs.c
@@ -88,10 +88,7 @@ static const char *fragShaderText2 =
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-dlist-getattriblocation.c b/tests/shaders/glsl-dlist-getattriblocation.c
index 0490bfbf7..a56a1f91d 100644
--- a/tests/shaders/glsl-dlist-getattriblocation.c
+++ b/tests/shaders/glsl-dlist-getattriblocation.c
@@ -96,11 +96,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- exit(1);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
}
diff --git a/tests/shaders/glsl-empty-vs-no-fs.c b/tests/shaders/glsl-empty-vs-no-fs.c
index 4a6d19a1e..bfe2444f4 100644
--- a/tests/shaders/glsl-empty-vs-no-fs.c
+++ b/tests/shaders/glsl-empty-vs-no-fs.c
@@ -75,8 +75,5 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
}
diff --git a/tests/shaders/glsl-explicit-location-01.c b/tests/shaders/glsl-explicit-location-01.c
index ce39e73a0..0b8b31b56 100644
--- a/tests/shaders/glsl-explicit-location-01.c
+++ b/tests/shaders/glsl-explicit-location-01.c
@@ -50,10 +50,7 @@ void piglit_init(int argc, char **argv)
GLint prog;
GLboolean ok;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_explicit_attrib_location");
diff --git a/tests/shaders/glsl-explicit-location-02.c b/tests/shaders/glsl-explicit-location-02.c
index 28f357167..93084fa86 100644
--- a/tests/shaders/glsl-explicit-location-02.c
+++ b/tests/shaders/glsl-explicit-location-02.c
@@ -53,10 +53,7 @@ void piglit_init(int argc, char **argv)
GLint loc;
GLboolean ok;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_explicit_attrib_location");
diff --git a/tests/shaders/glsl-explicit-location-03.c b/tests/shaders/glsl-explicit-location-03.c
index 18be4c626..7661ea425 100644
--- a/tests/shaders/glsl-explicit-location-03.c
+++ b/tests/shaders/glsl-explicit-location-03.c
@@ -50,10 +50,7 @@ void piglit_init(int argc, char **argv)
GLint prog;
GLboolean ok;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_explicit_attrib_location");
diff --git a/tests/shaders/glsl-explicit-location-04.c b/tests/shaders/glsl-explicit-location-04.c
index c570f2616..a5c99ca06 100644
--- a/tests/shaders/glsl-explicit-location-04.c
+++ b/tests/shaders/glsl-explicit-location-04.c
@@ -47,10 +47,7 @@ void piglit_init(int argc, char **argv)
GLint prog;
GLboolean ok;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_explicit_attrib_location");
diff --git a/tests/shaders/glsl-explicit-location-05.c b/tests/shaders/glsl-explicit-location-05.c
index 60ba27da1..bf79900e7 100644
--- a/tests/shaders/glsl-explicit-location-05.c
+++ b/tests/shaders/glsl-explicit-location-05.c
@@ -52,10 +52,7 @@ void piglit_init(int argc, char **argv)
GLboolean ok;
GLint loc;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_explicit_attrib_location");
diff --git a/tests/shaders/glsl-fs-bug25902.c b/tests/shaders/glsl-fs-bug25902.c
index 743e615c9..a50524967 100644
--- a/tests/shaders/glsl-fs-bug25902.c
+++ b/tests/shaders/glsl-fs-bug25902.c
@@ -74,10 +74,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 (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-fs-exp2.c b/tests/shaders/glsl-fs-exp2.c
index 862ae90e9..4ecd87050 100644
--- a/tests/shaders/glsl-fs-exp2.c
+++ b/tests/shaders/glsl-fs-exp2.c
@@ -68,10 +68,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-fs-flat-color.c b/tests/shaders/glsl-fs-flat-color.c
index 1ad928576..fa5cbca92 100644
--- a/tests/shaders/glsl-fs-flat-color.c
+++ b/tests/shaders/glsl-fs-flat-color.c
@@ -96,10 +96,7 @@ piglit_init(int argc, char **argv)
{
GLuint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader(GL_VERTEX_SHADER,
"shaders/glsl-color-mvp.vert");
diff --git a/tests/shaders/glsl-fs-fogcolor-statechange.c b/tests/shaders/glsl-fs-fogcolor-statechange.c
index d3374c2c0..4a8aa5ba3 100644
--- a/tests/shaders/glsl-fs-fogcolor-statechange.c
+++ b/tests/shaders/glsl-fs-fogcolor-statechange.c
@@ -72,10 +72,7 @@ piglit_init(int argc, char **argv)
" gl_FragColor = gl_Fog.color;\n"
"}\n";
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader(GL_VERTEX_SHADER,
"shaders/glsl-mvp.vert");
diff --git a/tests/shaders/glsl-fs-fragcoord-zw-ortho.c b/tests/shaders/glsl-fs-fragcoord-zw-ortho.c
index bdde679b0..5bd317ef5 100644
--- a/tests/shaders/glsl-fs-fragcoord-zw-ortho.c
+++ b/tests/shaders/glsl-fs-fragcoord-zw-ortho.c
@@ -115,10 +115,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs, prog;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-fs-fragcoord-zw-perspective.c b/tests/shaders/glsl-fs-fragcoord-zw-perspective.c
index b00f23ac9..8d16693e8 100644
--- a/tests/shaders/glsl-fs-fragcoord-zw-perspective.c
+++ b/tests/shaders/glsl-fs-fragcoord-zw-perspective.c
@@ -137,10 +137,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs, prog;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
diff --git a/tests/shaders/glsl-fs-fragcoord.c b/tests/shaders/glsl-fs-fragcoord.c
index 3e06d5661..dbbfd1355 100644
--- a/tests/shaders/glsl-fs-fragcoord.c
+++ b/tests/shaders/glsl-fs-fragcoord.c
@@ -74,10 +74,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-fs-loop-nested.c b/tests/shaders/glsl-fs-loop-nested.c
index e6a70c489..bb3d9cc6e 100644
--- a/tests/shaders/glsl-fs-loop-nested.c
+++ b/tests/shaders/glsl-fs-loop-nested.c
@@ -106,10 +106,7 @@ piglit_init(int argc, char **argv)
*/
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader(GL_VERTEX_SHADER,
"shaders/glsl-mvp.vert");
diff --git a/tests/shaders/glsl-fs-loop.c b/tests/shaders/glsl-fs-loop.c
index c86fa8ac3..559f23547 100644
--- a/tests/shaders/glsl-fs-loop.c
+++ b/tests/shaders/glsl-fs-loop.c
@@ -104,10 +104,7 @@ piglit_init(int argc, char **argv)
*/
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader(GL_VERTEX_SHADER,
"shaders/glsl-mvp.vert");
diff --git a/tests/shaders/glsl-fs-mix-constant.c b/tests/shaders/glsl-fs-mix-constant.c
index db10bbd4b..e98391c5f 100644
--- a/tests/shaders/glsl-fs-mix-constant.c
+++ b/tests/shaders/glsl-fs-mix-constant.c
@@ -63,10 +63,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-fs-mix.c b/tests/shaders/glsl-fs-mix.c
index fb24b525c..237450615 100644
--- a/tests/shaders/glsl-fs-mix.c
+++ b/tests/shaders/glsl-fs-mix.c
@@ -70,10 +70,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-fs-pointcoord.c b/tests/shaders/glsl-fs-pointcoord.c
index 707475a79..e09665852 100644
--- a/tests/shaders/glsl-fs-pointcoord.c
+++ b/tests/shaders/glsl-fs-pointcoord.c
@@ -86,11 +86,7 @@ void piglit_init(int argc, char**argv)
GLint vs, fs;
GLint point_size_limits[2];
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- exit(1);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_point_sprite");
glGetIntegerv(GL_ALIASED_POINT_SIZE_RANGE, point_size_limits);
diff --git a/tests/shaders/glsl-fs-raytrace-bug27060.c b/tests/shaders/glsl-fs-raytrace-bug27060.c
index ad7d801f0..966a476ff 100644
--- a/tests/shaders/glsl-fs-raytrace-bug27060.c
+++ b/tests/shaders/glsl-fs-raytrace-bug27060.c
@@ -282,10 +282,7 @@ piglit_init(int argc, char **argv)
glDisable(GL_DEPTH_TEST);
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
glViewport(0, 0, piglit_width, piglit_height);
glMatrixMode(GL_PROJECTION);
diff --git a/tests/shaders/glsl-fs-sampler-numbering.c b/tests/shaders/glsl-fs-sampler-numbering.c
index 6eedf006d..56648a3e2 100644
--- a/tests/shaders/glsl-fs-sampler-numbering.c
+++ b/tests/shaders/glsl-fs-sampler-numbering.c
@@ -74,10 +74,7 @@ piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader(GL_VERTEX_SHADER,
"shaders/glsl-tex-mvp.vert");
diff --git a/tests/shaders/glsl-fs-shader-stencil-export.c b/tests/shaders/glsl-fs-shader-stencil-export.c
index 7d2a66c4b..d27ba5964 100644
--- a/tests/shaders/glsl-fs-shader-stencil-export.c
+++ b/tests/shaders/glsl-fs-shader-stencil-export.c
@@ -67,10 +67,7 @@ piglit_init(int argc, char **argv)
GLint vs, fs;
piglit_require_extension("GL_ARB_shader_stencil_export");
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-fs-sqrt-branch.c b/tests/shaders/glsl-fs-sqrt-branch.c
index 67ed2aa57..48343834a 100644
--- a/tests/shaders/glsl-fs-sqrt-branch.c
+++ b/tests/shaders/glsl-fs-sqrt-branch.c
@@ -68,10 +68,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-fs-texture2drect.c b/tests/shaders/glsl-fs-texture2drect.c
index 94f571a73..764d00ad1 100644
--- a/tests/shaders/glsl-fs-texture2drect.c
+++ b/tests/shaders/glsl-fs-texture2drect.c
@@ -140,10 +140,7 @@ void piglit_init(int argc, char **argv)
proj4 = GL_TRUE;
}
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_texture_rectangle");
vs = piglit_compile_shader(GL_VERTEX_SHADER,
diff --git a/tests/shaders/glsl-fs-texturecube-2.c b/tests/shaders/glsl-fs-texturecube-2.c
index 3b84f5c9e..38fa6f821 100644
--- a/tests/shaders/glsl-fs-texturecube-2.c
+++ b/tests/shaders/glsl-fs-texturecube-2.c
@@ -204,10 +204,7 @@ void piglit_init(int argc, char **argv)
bias = GL_TRUE;
}
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_texture_cube_map");
vs = piglit_compile_shader(GL_VERTEX_SHADER,
diff --git a/tests/shaders/glsl-fs-texturecube.c b/tests/shaders/glsl-fs-texturecube.c
index cf0b7be5e..5f54eabce 100644
--- a/tests/shaders/glsl-fs-texturecube.c
+++ b/tests/shaders/glsl-fs-texturecube.c
@@ -167,10 +167,7 @@ void piglit_init(int argc, char **argv)
bias = GL_TRUE;
}
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_texture_cube_map");
vs = piglit_compile_shader(GL_VERTEX_SHADER,
diff --git a/tests/shaders/glsl-fs-textureenvcolor-statechange.c b/tests/shaders/glsl-fs-textureenvcolor-statechange.c
index 681d8ef5f..5b0695243 100644
--- a/tests/shaders/glsl-fs-textureenvcolor-statechange.c
+++ b/tests/shaders/glsl-fs-textureenvcolor-statechange.c
@@ -72,10 +72,7 @@ piglit_init(int argc, char **argv)
" gl_FragColor = gl_TextureEnvColor[0];\n"
"}\n";
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader(GL_VERTEX_SHADER,
"shaders/glsl-mvp.vert");
diff --git a/tests/shaders/glsl-fs-user-varying-ff.c b/tests/shaders/glsl-fs-user-varying-ff.c
index bdb441949..771d0fe9b 100644
--- a/tests/shaders/glsl-fs-user-varying-ff.c
+++ b/tests/shaders/glsl-fs-user-varying-ff.c
@@ -73,10 +73,7 @@ piglit_init(int argc, char **argv)
{
GLuint fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
glClearColor(0.3, 0.3, 0.3, 0.0);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-fwidth.c b/tests/shaders/glsl-fwidth.c
index ca36512b6..26358fd85 100644
--- a/tests/shaders/glsl-fwidth.c
+++ b/tests/shaders/glsl-fwidth.c
@@ -86,10 +86,7 @@ static const char *fragShaderText2 =
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
compileLinkProg();
diff --git a/tests/shaders/glsl-getactiveuniform-array-size.c b/tests/shaders/glsl-getactiveuniform-array-size.c
index ddca59f87..a3cfa96b4 100644
--- a/tests/shaders/glsl-getactiveuniform-array-size.c
+++ b/tests/shaders/glsl-getactiveuniform-array-size.c
@@ -55,10 +55,7 @@ piglit_init(int argc, char **argv)
GLsizei size;
GLenum type;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader(GL_VERTEX_SHADER,
"shaders/glsl-getactiveuniform-array-size.vert");
diff --git a/tests/shaders/glsl-getactiveuniform-length.c b/tests/shaders/glsl-getactiveuniform-length.c
index 1217c89d4..623a59cc4 100644
--- a/tests/shaders/glsl-getactiveuniform-length.c
+++ b/tests/shaders/glsl-getactiveuniform-length.c
@@ -56,10 +56,7 @@ piglit_init(int argc, char **argv)
char *name;
GLsizei size;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader(GL_VERTEX_SHADER,
"shaders/glsl-getactiveuniform-length.vert");
diff --git a/tests/shaders/glsl-getattriblocation.c b/tests/shaders/glsl-getattriblocation.c
index 4860cf1d2..a444384df 100644
--- a/tests/shaders/glsl-getattriblocation.c
+++ b/tests/shaders/glsl-getattriblocation.c
@@ -115,9 +115,5 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- exit(1);
- }
+ piglit_require_gl_version(20);
}
diff --git a/tests/shaders/glsl-invalid-asm-01.c b/tests/shaders/glsl-invalid-asm-01.c
index b658c6b1e..3cf38d779 100644
--- a/tests/shaders/glsl-invalid-asm-01.c
+++ b/tests/shaders/glsl-invalid-asm-01.c
@@ -78,10 +78,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLenum err;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_fragment_program");
diff --git a/tests/shaders/glsl-invalid-asm-02.c b/tests/shaders/glsl-invalid-asm-02.c
index 313347dcd..5cd3b158e 100644
--- a/tests/shaders/glsl-invalid-asm-02.c
+++ b/tests/shaders/glsl-invalid-asm-02.c
@@ -77,10 +77,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLenum err;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_vertex_program");
diff --git a/tests/shaders/glsl-kwin-blur-1.c b/tests/shaders/glsl-kwin-blur-1.c
index 36b92cfe3..1ab4dc689 100644
--- a/tests/shaders/glsl-kwin-blur-1.c
+++ b/tests/shaders/glsl-kwin-blur-1.c
@@ -229,8 +229,5 @@ enum piglit_result piglit_display(void)
void piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
}
diff --git a/tests/shaders/glsl-kwin-blur-2.c b/tests/shaders/glsl-kwin-blur-2.c
index 042d7a985..adb92c840 100644
--- a/tests/shaders/glsl-kwin-blur-2.c
+++ b/tests/shaders/glsl-kwin-blur-2.c
@@ -260,10 +260,7 @@ void piglit_init(int argc, char **argv)
{
int value;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
glGetIntegerv(GL_MAX_VARYING_FLOATS, &value);
if (value < (13 * 4)) {
diff --git a/tests/shaders/glsl-light-model.c b/tests/shaders/glsl-light-model.c
index 82647830b..35ff19fed 100644
--- a/tests/shaders/glsl-light-model.c
+++ b/tests/shaders/glsl-light-model.c
@@ -68,10 +68,7 @@ piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vs_code);
fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fs_code);
diff --git a/tests/shaders/glsl-link-bug30552.c b/tests/shaders/glsl-link-bug30552.c
index 1997d931a..3d8484140 100644
--- a/tests/shaders/glsl-link-bug30552.c
+++ b/tests/shaders/glsl-link-bug30552.c
@@ -46,10 +46,7 @@ void piglit_init(int argc, char **argv)
GLint prog;
GLboolean ok;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vert =
piglit_compile_shader(GL_VERTEX_SHADER,
diff --git a/tests/shaders/glsl-link-bug38015.c b/tests/shaders/glsl-link-bug38015.c
index d35c2a044..663eb85f5 100644
--- a/tests/shaders/glsl-link-bug38015.c
+++ b/tests/shaders/glsl-link-bug38015.c
@@ -58,10 +58,7 @@ void piglit_init(int argc, char **argv)
GLint prog;
const char *fs_text_ptr = fs_text;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
/* Intentionally omit check for GL_ARB_shader_texture_lod. */
diff --git a/tests/shaders/glsl-link-empty-prog-01.c b/tests/shaders/glsl-link-empty-prog-01.c
index 890fe8e17..70707f31a 100644
--- a/tests/shaders/glsl-link-empty-prog-01.c
+++ b/tests/shaders/glsl-link-empty-prog-01.c
@@ -46,8 +46,5 @@ enum piglit_result piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
}
diff --git a/tests/shaders/glsl-link-empty-prog-02.c b/tests/shaders/glsl-link-empty-prog-02.c
index 0f7545cbf..579c1ffe4 100644
--- a/tests/shaders/glsl-link-empty-prog-02.c
+++ b/tests/shaders/glsl-link-empty-prog-02.c
@@ -91,10 +91,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
prog = glCreateProgram();
diff --git a/tests/shaders/glsl-link-initializer-03.c b/tests/shaders/glsl-link-initializer-03.c
index 345d6c4cc..776a012e5 100644
--- a/tests/shaders/glsl-link-initializer-03.c
+++ b/tests/shaders/glsl-link-initializer-03.c
@@ -55,10 +55,7 @@ void piglit_init(int argc, char **argv)
GLint prog_c;
GLint prog_d;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vert[0] =
piglit_compile_shader(GL_VERTEX_SHADER,
diff --git a/tests/shaders/glsl-link-test.c b/tests/shaders/glsl-link-test.c
index f0f9e5534..56fd636b9 100644
--- a/tests/shaders/glsl-link-test.c
+++ b/tests/shaders/glsl-link-test.c
@@ -49,10 +49,7 @@ void piglit_init(int argc, char **argv)
unsigned i;
const char *invalid_file = NULL;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_GLSL();
program = piglit_CreateProgram();
diff --git a/tests/shaders/glsl-lod-bias.c b/tests/shaders/glsl-lod-bias.c
index 28ff20824..ff99099cd 100644
--- a/tests/shaders/glsl-lod-bias.c
+++ b/tests/shaders/glsl-lod-bias.c
@@ -80,10 +80,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 (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
loadTex();
compileLinkProg();
diff --git a/tests/shaders/glsl-mat-attribute.c b/tests/shaders/glsl-mat-attribute.c
index 6d306e38f..f4b518187 100644
--- a/tests/shaders/glsl-mat-attribute.c
+++ b/tests/shaders/glsl-mat-attribute.c
@@ -200,10 +200,7 @@ void piglit_init(int argc, char **argv)
unsigned i;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-max-varyings.c b/tests/shaders/glsl-max-varyings.c
index a0ad43374..dead8e374 100644
--- a/tests/shaders/glsl-max-varyings.c
+++ b/tests/shaders/glsl-max-varyings.c
@@ -261,10 +261,7 @@ piglit_display(void)
void piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
printf("Vertical axis: Increasing numbers of varyings.\n");
printf("Horizontal axis: Which of the varyings contains the color.\n");
diff --git a/tests/shaders/glsl-max-vertex-attrib.c b/tests/shaders/glsl-max-vertex-attrib.c
index 19b4b582b..f0b1873d6 100644
--- a/tests/shaders/glsl-max-vertex-attrib.c
+++ b/tests/shaders/glsl-max-vertex-attrib.c
@@ -152,9 +152,5 @@ enum piglit_result piglit_display(void)
void piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- exit(1);
- }
+ piglit_require_gl_version(20);
}
diff --git a/tests/shaders/glsl-novertexdata.c b/tests/shaders/glsl-novertexdata.c
index a77b477c3..66253fe05 100644
--- a/tests/shaders/glsl-novertexdata.c
+++ b/tests/shaders/glsl-novertexdata.c
@@ -103,9 +103,5 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- exit(1);
- }
+ piglit_require_gl_version(20);
}
diff --git a/tests/shaders/glsl-orangebook-ch06-bump.c b/tests/shaders/glsl-orangebook-ch06-bump.c
index 8a8640184..56e7bcf73 100644
--- a/tests/shaders/glsl-orangebook-ch06-bump.c
+++ b/tests/shaders/glsl-orangebook-ch06-bump.c
@@ -103,10 +103,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader(GL_VERTEX_SHADER,
"shaders/glsl-orangebook-ch06-bump.vert");
diff --git a/tests/shaders/glsl-preprocessor-comments.c b/tests/shaders/glsl-preprocessor-comments.c
index cfac79a02..82333a291 100644
--- a/tests/shaders/glsl-preprocessor-comments.c
+++ b/tests/shaders/glsl-preprocessor-comments.c
@@ -68,10 +68,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-routing.c b/tests/shaders/glsl-routing.c
index 8f3092f1e..acabde2da 100644
--- a/tests/shaders/glsl-routing.c
+++ b/tests/shaders/glsl-routing.c
@@ -320,9 +320,6 @@ void piglit_init(int argc, char **argv)
{
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
}
diff --git a/tests/shaders/glsl-sin.c b/tests/shaders/glsl-sin.c
index 24f71cb57..2f40f9653 100644
--- a/tests/shaders/glsl-sin.c
+++ b/tests/shaders/glsl-sin.c
@@ -111,9 +111,6 @@ enum piglit_result piglit_display(void)
void piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
}
diff --git a/tests/shaders/glsl-uniform-update.c b/tests/shaders/glsl-uniform-update.c
index b396b0f8d..12439f40e 100644
--- a/tests/shaders/glsl-uniform-update.c
+++ b/tests/shaders/glsl-uniform-update.c
@@ -75,10 +75,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-unused-varying.c b/tests/shaders/glsl-unused-varying.c
index 73ac12ab1..07474c354 100644
--- a/tests/shaders/glsl-unused-varying.c
+++ b/tests/shaders/glsl-unused-varying.c
@@ -77,10 +77,7 @@ void piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-useprogram-displaylist.c b/tests/shaders/glsl-useprogram-displaylist.c
index f535bc50c..1cc2d1f97 100644
--- a/tests/shaders/glsl-useprogram-displaylist.c
+++ b/tests/shaders/glsl-useprogram-displaylist.c
@@ -56,10 +56,7 @@ piglit_init(int argc, char **argv)
GLint fsg;
GLint vs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
glClearColor(0.2, 0.2, 0.2, 1.0);
diff --git a/tests/shaders/glsl-vs-arrays.c b/tests/shaders/glsl-vs-arrays.c
index 6241d9491..17f9a0167 100644
--- a/tests/shaders/glsl-vs-arrays.c
+++ b/tests/shaders/glsl-vs-arrays.c
@@ -64,10 +64,7 @@ void piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-vs-functions.c b/tests/shaders/glsl-vs-functions.c
index f87ea3645..16a0a4713 100644
--- a/tests/shaders/glsl-vs-functions.c
+++ b/tests/shaders/glsl-vs-functions.c
@@ -66,10 +66,7 @@ piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-vs-if-bool.c b/tests/shaders/glsl-vs-if-bool.c
index ee2298d33..05d4e8789 100644
--- a/tests/shaders/glsl-vs-if-bool.c
+++ b/tests/shaders/glsl-vs-if-bool.c
@@ -67,10 +67,7 @@ void piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-vs-loop-nested.c b/tests/shaders/glsl-vs-loop-nested.c
index 83aad6c52..ec2b043d5 100644
--- a/tests/shaders/glsl-vs-loop-nested.c
+++ b/tests/shaders/glsl-vs-loop-nested.c
@@ -105,10 +105,7 @@ piglit_init(int argc, char **argv)
*/
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader(GL_VERTEX_SHADER,
"shaders/glsl-vs-loop-nested.vert");
diff --git a/tests/shaders/glsl-vs-loop.c b/tests/shaders/glsl-vs-loop.c
index 2338104f9..b1f6bf7e0 100644
--- a/tests/shaders/glsl-vs-loop.c
+++ b/tests/shaders/glsl-vs-loop.c
@@ -104,10 +104,7 @@ piglit_init(int argc, char **argv)
*/
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader(GL_VERTEX_SHADER,
"shaders/glsl-vs-loop.vert");
diff --git a/tests/shaders/glsl-vs-mov-after-deref.c b/tests/shaders/glsl-vs-mov-after-deref.c
index 6298eef2f..98c0f94c5 100644
--- a/tests/shaders/glsl-vs-mov-after-deref.c
+++ b/tests/shaders/glsl-vs-mov-after-deref.c
@@ -64,10 +64,7 @@ void piglit_init(int argc, char **argv)
{
GLint vs, fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-vs-mvp-statechange.c b/tests/shaders/glsl-vs-mvp-statechange.c
index 9a852d878..a8f183456 100644
--- a/tests/shaders/glsl-vs-mvp-statechange.c
+++ b/tests/shaders/glsl-vs-mvp-statechange.c
@@ -74,10 +74,7 @@ piglit_init(int argc, char **argv)
" gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0);\n"
"}\n";
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/glsl-vs-normalscale.c b/tests/shaders/glsl-vs-normalscale.c
index add579a0f..64c00c006 100644
--- a/tests/shaders/glsl-vs-normalscale.c
+++ b/tests/shaders/glsl-vs-normalscale.c
@@ -69,10 +69,7 @@ void piglit_init(int argc, char **argv)
GLint vs, fs;
int loc;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader(GL_VERTEX_SHADER,
"shaders/glsl-vs-normalscale.vert");
diff --git a/tests/shaders/glsl-vs-point-size.c b/tests/shaders/glsl-vs-point-size.c
index 3ec341c64..7a1c3080b 100644
--- a/tests/shaders/glsl-vs-point-size.c
+++ b/tests/shaders/glsl-vs-point-size.c
@@ -87,10 +87,7 @@ piglit_init(int argc, char **argv)
GLint vs;
GLint point_size_range[2];
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
/* If the driver doesn't claim to support the point size the
shader is going to set then we should skip the test */
glGetIntegerv(GL_ALIASED_POINT_SIZE_RANGE, point_size_range);
diff --git a/tests/shaders/glsl-vs-raytrace-bug26691.c b/tests/shaders/glsl-vs-raytrace-bug26691.c
index 38aeb3840..9ed4e4541 100644
--- a/tests/shaders/glsl-vs-raytrace-bug26691.c
+++ b/tests/shaders/glsl-vs-raytrace-bug26691.c
@@ -274,10 +274,7 @@ piglit_init(int argc, char **argv)
glDisable(GL_DEPTH_TEST);
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
glViewport(0, 0, piglit_width, piglit_height);
glMatrixMode(GL_PROJECTION);
diff --git a/tests/shaders/glsl-vs-statechange-1.c b/tests/shaders/glsl-vs-statechange-1.c
index d84a17f42..3e2a5366c 100644
--- a/tests/shaders/glsl-vs-statechange-1.c
+++ b/tests/shaders/glsl-vs-statechange-1.c
@@ -79,10 +79,7 @@ piglit_init(int argc, char **argv)
{
GLint vs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vs_source);
diff --git a/tests/shaders/glsl-vs-texturematrix-1.c b/tests/shaders/glsl-vs-texturematrix-1.c
index 37c3d7f50..013f55684 100644
--- a/tests/shaders/glsl-vs-texturematrix-1.c
+++ b/tests/shaders/glsl-vs-texturematrix-1.c
@@ -84,10 +84,7 @@ void piglit_init(int argc, char **argv)
GLint vs, fs;
int loc;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader(GL_VERTEX_SHADER,
"shaders/glsl-vs-texturematrix-1.vert");
diff --git a/tests/shaders/glsl-vs-texturematrix-2.c b/tests/shaders/glsl-vs-texturematrix-2.c
index b6190e0c6..806d01eef 100644
--- a/tests/shaders/glsl-vs-texturematrix-2.c
+++ b/tests/shaders/glsl-vs-texturematrix-2.c
@@ -86,10 +86,7 @@ void piglit_init(int argc, char **argv)
GLint vs, fs;
int loc;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader(GL_VERTEX_SHADER,
"shaders/glsl-vs-texturematrix-2.vert");
diff --git a/tests/shaders/glsl-vs-user-varying-ff.c b/tests/shaders/glsl-vs-user-varying-ff.c
index 14a5424df..e27398957 100644
--- a/tests/shaders/glsl-vs-user-varying-ff.c
+++ b/tests/shaders/glsl-vs-user-varying-ff.c
@@ -71,10 +71,7 @@ piglit_init(int argc, char **argv)
{
GLuint vs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
glClearColor(0.3, 0.3, 0.3, 0.0);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/shaders/link-mismatch-layout-01.c b/tests/shaders/link-mismatch-layout-01.c
index 9fff30f15..d77997827 100644
--- a/tests/shaders/link-mismatch-layout-01.c
+++ b/tests/shaders/link-mismatch-layout-01.c
@@ -68,10 +68,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLuint fs[2];
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_fragment_coord_conventions");
diff --git a/tests/shaders/link-mismatch-layout-02.c b/tests/shaders/link-mismatch-layout-02.c
index 8e164e1f4..254acb181 100644
--- a/tests/shaders/link-mismatch-layout-02.c
+++ b/tests/shaders/link-mismatch-layout-02.c
@@ -68,10 +68,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLuint fs[2];
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_AMD_conservative_depth");
diff --git a/tests/shaders/link-mismatch-layout-03.c b/tests/shaders/link-mismatch-layout-03.c
index 0cf215bff..e5b7dba21 100644
--- a/tests/shaders/link-mismatch-layout-03.c
+++ b/tests/shaders/link-mismatch-layout-03.c
@@ -66,10 +66,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLuint fs[2];
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_fragment_coord_conventions");
diff --git a/tests/shaders/link-unresolved-function.c b/tests/shaders/link-unresolved-function.c
index f6134e9aa..1e7d0d4a9 100644
--- a/tests/shaders/link-unresolved-function.c
+++ b/tests/shaders/link-unresolved-function.c
@@ -51,10 +51,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLuint vs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader_text(GL_VERTEX_SHADER, bad_vs_text);
prog = glCreateProgram();
diff --git a/tests/shaders/sso-simple.c b/tests/shaders/sso-simple.c
index 51a17300c..5bf3e8fe1 100644
--- a/tests/shaders/sso-simple.c
+++ b/tests/shaders/sso-simple.c
@@ -108,10 +108,7 @@ piglit_init(int argc, char **argv)
GLuint vs;
GLuint fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_separate_shader_objects");
diff --git a/tests/shaders/sso-uniforms-01.c b/tests/shaders/sso-uniforms-01.c
index ee753e99c..73c408c9f 100644
--- a/tests/shaders/sso-uniforms-01.c
+++ b/tests/shaders/sso-uniforms-01.c
@@ -81,10 +81,7 @@ piglit_init(int argc, char **argv)
{
GLint loc;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_separate_shader_objects");
diff --git a/tests/shaders/sso-uniforms-02.c b/tests/shaders/sso-uniforms-02.c
index 92ce09660..fd49b45b2 100644
--- a/tests/shaders/sso-uniforms-02.c
+++ b/tests/shaders/sso-uniforms-02.c
@@ -80,10 +80,7 @@ piglit_init(int argc, char **argv)
{
GLint loc;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_separate_shader_objects");
diff --git a/tests/shaders/sso-user-varying-01.c b/tests/shaders/sso-user-varying-01.c
index 2cd1695a2..b561aaba3 100644
--- a/tests/shaders/sso-user-varying-01.c
+++ b/tests/shaders/sso-user-varying-01.c
@@ -86,10 +86,7 @@ piglit_init(int argc, char **argv)
GLuint vs;
GLuint fs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_separate_shader_objects");
diff --git a/tests/shaders/sso-user-varying-02.c b/tests/shaders/sso-user-varying-02.c
index dacd14a95..28ec54f32 100644
--- a/tests/shaders/sso-user-varying-02.c
+++ b/tests/shaders/sso-user-varying-02.c
@@ -84,10 +84,7 @@ piglit_init(int argc, char **argv)
{
GLboolean try_to_render;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_separate_shader_objects");
diff --git a/tests/shaders/trinity-fp1.c b/tests/shaders/trinity-fp1.c
index 52fb4bbd8..46bee5596 100644
--- a/tests/shaders/trinity-fp1.c
+++ b/tests/shaders/trinity-fp1.c
@@ -229,10 +229,7 @@ piglit_init(int argc, char **argv)
"END";
- if (piglit_get_gl_version() < 13) {
- printf("Requires OpenGL 1.3\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(13);
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
diff --git a/tests/shaders/useprogram-flushverts-1.c b/tests/shaders/useprogram-flushverts-1.c
index 16b794159..8f4089694 100644
--- a/tests/shaders/useprogram-flushverts-1.c
+++ b/tests/shaders/useprogram-flushverts-1.c
@@ -113,10 +113,7 @@ piglit_init(int argc, char **argv)
" gl_FragColor = vec4(0.0, 0.0, 1.0, 0.0);\n"
"}\n";
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vs_source);
fs1 = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fs1_source);
diff --git a/tests/shaders/useprogram-flushverts-2.c b/tests/shaders/useprogram-flushverts-2.c
index ef88efe32..fd859e942 100644
--- a/tests/shaders/useprogram-flushverts-2.c
+++ b/tests/shaders/useprogram-flushverts-2.c
@@ -119,10 +119,7 @@ piglit_init(int argc, char **argv)
" gl_FragColor = vec4(0.0, 0.0, 1.0, 0.0);\n"
"}\n";
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vs_source);
fs1 = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fs1_source);
diff --git a/tests/shaders/useprogram-inside-begin.c b/tests/shaders/useprogram-inside-begin.c
index 21d309db0..ae8b6d00a 100644
--- a/tests/shaders/useprogram-inside-begin.c
+++ b/tests/shaders/useprogram-inside-begin.c
@@ -55,10 +55,7 @@ piglit_init(int argc, char **argv)
GLint vs;
GLenum err;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vs_text);
fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fs_text);
diff --git a/tests/shaders/useprogram-refcount-1.c b/tests/shaders/useprogram-refcount-1.c
index d2f3e9809..4ff7db950 100644
--- a/tests/shaders/useprogram-refcount-1.c
+++ b/tests/shaders/useprogram-refcount-1.c
@@ -82,10 +82,7 @@ piglit_init(int argc, char **argv)
" gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0);\n"
"}\n";
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vs_source);
fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fs_source);
diff --git a/tests/shaders/useshaderprogram-bad-program.c b/tests/shaders/useshaderprogram-bad-program.c
index 294357bc9..9a90e38a4 100644
--- a/tests/shaders/useshaderprogram-bad-program.c
+++ b/tests/shaders/useshaderprogram-bad-program.c
@@ -56,10 +56,7 @@ piglit_init(int argc, char **argv)
GLuint prog;
GLuint vs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_separate_shader_objects");
diff --git a/tests/shaders/useshaderprogram-bad-type.c b/tests/shaders/useshaderprogram-bad-type.c
index 226b7a2a2..96903039a 100644
--- a/tests/shaders/useshaderprogram-bad-type.c
+++ b/tests/shaders/useshaderprogram-bad-type.c
@@ -81,10 +81,7 @@ piglit_init(int argc, char **argv)
? 0 : GL_INVALID_ENUM;
GLboolean pass;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_separate_shader_objects");
diff --git a/tests/shaders/useshaderprogram-flushverts-1.c b/tests/shaders/useshaderprogram-flushverts-1.c
index 61532ef88..e72a15003 100644
--- a/tests/shaders/useshaderprogram-flushverts-1.c
+++ b/tests/shaders/useshaderprogram-flushverts-1.c
@@ -115,10 +115,7 @@ piglit_init(int argc, char **argv)
" gl_FragColor = vec4(0.0, 0.0, 1.0, 0.0);\n"
"}\n";
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_separate_shader_objects");
vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vs_source);
diff --git a/tests/shaders/vp-ignore-input.c b/tests/shaders/vp-ignore-input.c
index 823308be1..4d90ec988 100644
--- a/tests/shaders/vp-ignore-input.c
+++ b/tests/shaders/vp-ignore-input.c
@@ -73,10 +73,7 @@ piglit_init(int argc, char **argv)
glClearColor(0.2, 0.2, 0.2, 1.0);
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
compileLinkProg();
}
diff --git a/tests/spec/arb_copy_buffer/copy_buffer_coherency.c b/tests/spec/arb_copy_buffer/copy_buffer_coherency.c
index f3dd62d44..76564f8be 100644
--- a/tests/spec/arb_copy_buffer/copy_buffer_coherency.c
+++ b/tests/spec/arb_copy_buffer/copy_buffer_coherency.c
@@ -71,10 +71,7 @@ do_copy()
void
piglit_init(int argc, char *argv[])
{
- if (piglit_get_gl_version() < 15) {
- printf("Requires OpenGL 1.5\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(15);
piglit_require_extension("GL_ARB_vertex_buffer_object");
piglit_require_extension("GL_ARB_copy_buffer");
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 e281108d2..bb6960550 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
@@ -83,10 +83,7 @@ piglit_init(int argc, char **argv)
GLuint vs, prog;
int i,j;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_ES2_compatibility");
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
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 5767867f2..5d8f95dbc 100644
--- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-getshaderprecisionformat.c
+++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-getshaderprecisionformat.c
@@ -71,10 +71,7 @@ piglit_init(int argc, char **argv)
{ GL_HIGH_INT, { 16, 16 }, 0 }
};
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
if (!piglit_is_extension_supported("GL_ARB_ES2_compatibility")) {
printf("Requires ARB_ES2_compatibility\n");
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 7c3204685..139c91540 100644
--- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-maxvectors.c
+++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-maxvectors.c
@@ -46,10 +46,7 @@ piglit_init(int argc, char **argv)
GLboolean pass = GL_TRUE;
GLint floats, vecs;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
if (!piglit_is_extension_supported("GL_ARB_ES2_compatibility")) {
printf("Requires ARB_ES2_compatibility\n");
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 69fb69173..e8c5bd024 100644
--- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c
+++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c
@@ -123,10 +123,7 @@ piglit_init(int argc, char **argv)
+0.0, -1.0, 0.0, 1.0,
};
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
if (!piglit_is_extension_supported("GL_ARB_ES2_compatibility")) {
printf("Requires ARB_ES2_compatibility\n");
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 b9fb9898e..f0e1dc277 100644
--- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-shadercompiler.c
+++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-shadercompiler.c
@@ -46,10 +46,7 @@ piglit_init(int argc, char **argv)
#ifdef GL_ARB_ES2_compatibility
GLint shadercompiler;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
if (!piglit_is_extension_supported("GL_ARB_ES2_compatibility")) {
printf("Requires ARB_ES2_compatibility\n");
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 1e6f69b2c..f09c4a4ab 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
@@ -47,10 +47,7 @@ piglit_init(int argc, char *argv[])
GLbitfield access = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT;
GLuint buffer;
- if (piglit_get_gl_version() < 15) {
- printf("Requires OpenGL 1.5\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(15);
piglit_require_extension("GL_ARB_map_buffer_range");
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 b8a89b0e2..d23f556e7 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
@@ -64,10 +64,7 @@ piglit_init(int argc, char *argv[])
int i;
bool ret;
- if (piglit_get_gl_version() < 15) {
- printf("Requires OpenGL 1.5\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(15);
piglit_require_extension("GL_ARB_map_buffer_range");
diff --git a/tests/spec/arb_robustness/draw-vbo-bounds.c b/tests/spec/arb_robustness/draw-vbo-bounds.c
index 8256f4e41..cd5e22f17 100644
--- a/tests/spec/arb_robustness/draw-vbo-bounds.c
+++ b/tests/spec/arb_robustness/draw-vbo-bounds.c
@@ -56,10 +56,7 @@ void piglit_init(int argc, char **argv)
{
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 15) {
- printf("Requires OpenGL 1.5\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(15);
glShadeModel(GL_FLAT);
glClearColor(0.2, 0.2, 0.2, 1.0);
diff --git a/tests/spec/arb_timer_query/timestamp-get.c b/tests/spec/arb_timer_query/timestamp-get.c
index 39f1679ed..398f64a21 100644
--- a/tests/spec/arb_timer_query/timestamp-get.c
+++ b/tests/spec/arb_timer_query/timestamp-get.c
@@ -134,10 +134,7 @@ piglit_init(int argc, char **argv)
{
piglit_automatic = true;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_ARB_timer_query");
}
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 6c4f11610..032369908 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
@@ -53,10 +53,7 @@ void piglit_init(int argc, char **argv)
{
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 15) {
- printf("Requires OpenGL 1.5\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(15);
piglit_require_extension("GL_ARB_vertex_type_2_10_10_10_rev");
glShadeModel(GL_FLAT);
diff --git a/tests/spec/ext_timer_query/time-elapsed.c b/tests/spec/ext_timer_query/time-elapsed.c
index ce27ce0fa..c473fe5c3 100644
--- a/tests/spec/ext_timer_query/time-elapsed.c
+++ b/tests/spec/ext_timer_query/time-elapsed.c
@@ -265,10 +265,7 @@ retry:
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_EXT_timer_query");
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 5014751e3..82b96a0a0 100644
--- a/tests/spec/gl-2.0/vertex-program-two-side.c
+++ b/tests/spec/gl-2.0/vertex-program-two-side.c
@@ -152,10 +152,7 @@ piglit_init(int argc, char **argv)
piglit_require_GLSL();
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
printf("Window quadrants show:\n");
printf("+-------------------------+------------------------+\n");
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 4c87a371c..d6896596d 100644
--- a/tests/spec/gl-3.0/required-renderbuffer-attachment-formats.c
+++ b/tests/spec/gl-3.0/required-renderbuffer-attachment-formats.c
@@ -51,10 +51,7 @@ piglit_init(int argc, char **argv)
GLuint rb, fbo;
int i;
- if (piglit_get_gl_version() < 30) {
- printf("Requires GL 3.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(30);
glGenRenderbuffers(1, &rb);
glBindRenderbuffer(GL_RENDERBUFFER, rb);
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 21c7849a1..20bb2e2e4 100644
--- a/tests/spec/gl-3.0/required-sized-texture-formats.c
+++ b/tests/spec/gl-3.0/required-sized-texture-formats.c
@@ -78,10 +78,7 @@ piglit_init(int argc, char **argv)
GLuint tex;
int i, c;
- if (piglit_get_gl_version() < 30) {
- printf("Requires GL 3.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(30);
glGenTextures(1, &tex);
glBindTexture(GL_TEXTURE_2D, tex);
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 1850ab397..8a5fa76ac 100644
--- a/tests/spec/gl-3.0/required-texture-attachment-formats.c
+++ b/tests/spec/gl-3.0/required-texture-attachment-formats.c
@@ -51,10 +51,7 @@ piglit_init(int argc, char **argv)
GLuint tex, fbo;
int i, c;
- if (piglit_get_gl_version() < 30) {
- printf("Requires GL 3.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(30);
glGenTextures(1, &tex);
glBindTexture(GL_TEXTURE_2D, tex);
diff --git a/tests/spec/nv_conditional_render/begin-while-active.c b/tests/spec/nv_conditional_render/begin-while-active.c
index a1363230b..1bd4b7921 100644
--- a/tests/spec/nv_conditional_render/begin-while-active.c
+++ b/tests/spec/nv_conditional_render/begin-while-active.c
@@ -56,10 +56,7 @@ piglit_init(int argc, char **argv)
{
GLuint q;
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_NV_conditional_render");
diff --git a/tests/spec/nv_conditional_render/begin-zero.c b/tests/spec/nv_conditional_render/begin-zero.c
index 5a8177522..b7aab6fbd 100644
--- a/tests/spec/nv_conditional_render/begin-zero.c
+++ b/tests/spec/nv_conditional_render/begin-zero.c
@@ -54,10 +54,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_NV_conditional_render");
diff --git a/tests/spec/nv_conditional_render/bitmap.c b/tests/spec/nv_conditional_render/bitmap.c
index 2e54d7b33..ceda6558c 100644
--- a/tests/spec/nv_conditional_render/bitmap.c
+++ b/tests/spec/nv_conditional_render/bitmap.c
@@ -99,10 +99,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_NV_conditional_render");
}
diff --git a/tests/spec/nv_conditional_render/blitframebuffer.c b/tests/spec/nv_conditional_render/blitframebuffer.c
index f45e4c163..5b9d487d5 100644
--- a/tests/spec/nv_conditional_render/blitframebuffer.c
+++ b/tests/spec/nv_conditional_render/blitframebuffer.c
@@ -131,10 +131,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_NV_conditional_render");
piglit_require_extension("GL_EXT_framebuffer_object");
diff --git a/tests/spec/nv_conditional_render/clear.c b/tests/spec/nv_conditional_render/clear.c
index 1884ad0be..8bc26b96e 100644
--- a/tests/spec/nv_conditional_render/clear.c
+++ b/tests/spec/nv_conditional_render/clear.c
@@ -92,10 +92,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_NV_conditional_render");
}
diff --git a/tests/spec/nv_conditional_render/copypixels.c b/tests/spec/nv_conditional_render/copypixels.c
index 4ffd8aff8..f87e81790 100644
--- a/tests/spec/nv_conditional_render/copypixels.c
+++ b/tests/spec/nv_conditional_render/copypixels.c
@@ -95,10 +95,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_NV_conditional_render");
}
diff --git a/tests/spec/nv_conditional_render/copyteximage.c b/tests/spec/nv_conditional_render/copyteximage.c
index e8d1c7cf2..8fd7dfa06 100644
--- a/tests/spec/nv_conditional_render/copyteximage.c
+++ b/tests/spec/nv_conditional_render/copyteximage.c
@@ -116,10 +116,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_NV_conditional_render");
}
diff --git a/tests/spec/nv_conditional_render/copytexsubimage.c b/tests/spec/nv_conditional_render/copytexsubimage.c
index 675e4fff7..1a70b5c74 100644
--- a/tests/spec/nv_conditional_render/copytexsubimage.c
+++ b/tests/spec/nv_conditional_render/copytexsubimage.c
@@ -116,10 +116,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_NV_conditional_render");
}
diff --git a/tests/spec/nv_conditional_render/dlist.c b/tests/spec/nv_conditional_render/dlist.c
index e33ea1299..75286b5d3 100644
--- a/tests/spec/nv_conditional_render/dlist.c
+++ b/tests/spec/nv_conditional_render/dlist.c
@@ -87,10 +87,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_NV_conditional_render");
}
diff --git a/tests/spec/nv_conditional_render/drawpixels.c b/tests/spec/nv_conditional_render/drawpixels.c
index 371d8e806..d56b6c836 100644
--- a/tests/spec/nv_conditional_render/drawpixels.c
+++ b/tests/spec/nv_conditional_render/drawpixels.c
@@ -109,10 +109,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_NV_conditional_render");
}
diff --git a/tests/spec/nv_conditional_render/generatemipmap.c b/tests/spec/nv_conditional_render/generatemipmap.c
index 90ce8f6d8..abc8497ca 100644
--- a/tests/spec/nv_conditional_render/generatemipmap.c
+++ b/tests/spec/nv_conditional_render/generatemipmap.c
@@ -115,10 +115,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_NV_conditional_render");
piglit_require_extension("GL_EXT_framebuffer_object");
diff --git a/tests/spec/nv_conditional_render/vertex_array.c b/tests/spec/nv_conditional_render/vertex_array.c
index 25b387f19..b5d97dba1 100644
--- a/tests/spec/nv_conditional_render/vertex_array.c
+++ b/tests/spec/nv_conditional_render/vertex_array.c
@@ -92,10 +92,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
piglit_require_extension("GL_NV_conditional_render");
}
diff --git a/tests/texturing/depth-tex-modes-glsl.c b/tests/texturing/depth-tex-modes-glsl.c
index ba718b466..b1ecc89fe 100644
--- a/tests/texturing/depth-tex-modes-glsl.c
+++ b/tests/texturing/depth-tex-modes-glsl.c
@@ -82,10 +82,7 @@ static void loadTex(void);
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
if (piglit_automatic)
printf(" Left to Right: LUMINANCE, INTENSITY, ALPHA\n"
diff --git a/tests/texturing/fragment-and-vertex-texturing.c b/tests/texturing/fragment-and-vertex-texturing.c
index 1e98e619c..d960c5e8e 100644
--- a/tests/texturing/fragment-and-vertex-texturing.c
+++ b/tests/texturing/fragment-and-vertex-texturing.c
@@ -179,10 +179,7 @@ piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- if (piglit_get_gl_version() < 20) {
- printf("Requires OpenGL 2.0\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(20);
glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB, &m);
if (m < 1) {
diff --git a/tests/texturing/lodbias.c b/tests/texturing/lodbias.c
index 310f7aa01..bc13e4e0d 100644
--- a/tests/texturing/lodbias.c
+++ b/tests/texturing/lodbias.c
@@ -297,10 +297,7 @@ piglit_init(int argc, char **argv)
{
int i;
- if (piglit_get_gl_version() < 13) {
- printf("Requires OpenGL 1.3\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(13);
piglit_require_extension("GL_EXT_texture_lod_bias");
diff --git a/tests/texturing/tex3d-maxsize.c b/tests/texturing/tex3d-maxsize.c
index 465fffc3e..0a8f45b2d 100644
--- a/tests/texturing/tex3d-maxsize.c
+++ b/tests/texturing/tex3d-maxsize.c
@@ -188,10 +188,7 @@ piglit_display(void)
void piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 12) {
- printf("Requires OpenGL 1.2\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(12);
glDisable(GL_DITHER);
}
diff --git a/tests/texturing/tex3d.c b/tests/texturing/tex3d.c
index 9e05da9e2..49b358a9f 100644
--- a/tests/texturing/tex3d.c
+++ b/tests/texturing/tex3d.c
@@ -219,10 +219,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- if (piglit_get_gl_version() < 12) {
- printf("Requires OpenGL 1.2\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(12);
piglit_automatic = GL_TRUE;
diff --git a/tests/texturing/texrect-many.c b/tests/texturing/texrect-many.c
index aaff6fbcc..b991a204e 100644
--- a/tests/texturing/texrect-many.c
+++ b/tests/texturing/texrect-many.c
@@ -103,10 +103,7 @@ void piglit_init(int argc, char **argv)
int i;
int maxtextures;
- if (piglit_get_gl_version() < 13) {
- printf("Requires OpenGL 1.3\n");
- piglit_report_result(PIGLIT_SKIP);
- }
+ piglit_require_gl_version(13);
piglit_require_extension("GL_ARB_texture_rectangle");