summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2012-04-06 13:32:05 -0700
committerChad Versace <chad.versace@linux.intel.com>2012-05-19 19:54:21 -0700
commitb6b6db20740153f99ee7a6e8d5cecb9354ea616f (patch)
tree95baaa8a661fdbe0ee2df46230894e4b20e2d487
parent941141e6e094163896fc44a5b1d47621ec2037bf (diff)
tests: Remove use of glutExtensionSupported
Replace it with piglit_is_extension_supported or piglit_require_extension, as appropriate. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--tests/asmparsertest/asmparsertest.c9
-rw-r--r--tests/bugs/crash-texparameter-before-teximage.c4
-rw-r--r--tests/bugs/tex1d-2dborder.c2
-rw-r--r--tests/fbo/fbo-3d.c2
-rw-r--r--tests/fbo/fbo-formats.h2
-rw-r--r--tests/fbo/fbo-storage-completeness.c6
-rw-r--r--tests/fbo/fbo-storage-formats.c6
-rw-r--r--tests/general/framebuffer-srgb.c2
-rw-r--r--tests/general/isbufferobj.c2
-rw-r--r--tests/general/texunits.c6
-rw-r--r--tests/shaders/vp-address-02.c2
-rw-r--r--tests/shaders/vp-address-04.c2
-rw-r--r--tests/texturing/array-texture.c2
-rw-r--r--tests/texturing/crossbar.c10
-rw-r--r--tests/texturing/tex-srgb.c2
-rw-r--r--tests/texturing/texdepth.c6
16 files changed, 29 insertions, 36 deletions
diff --git a/tests/asmparsertest/asmparsertest.c b/tests/asmparsertest/asmparsertest.c
index 4c36aa05e..728ea560a 100644
--- a/tests/asmparsertest/asmparsertest.c
+++ b/tests/asmparsertest/asmparsertest.c
@@ -139,14 +139,7 @@ compile(const char *filename, GLenum target, int use_ARB)
}
extension[i] = '\0';
-
- if (!glutExtensionSupported(extension)) {
- printf("Test requires %s\n", extension);
- piglit_report_result(PIGLIT_SKIP);
-
- free(buf);
- return;
- }
+ piglit_require_extension(extension);
}
}
diff --git a/tests/bugs/crash-texparameter-before-teximage.c b/tests/bugs/crash-texparameter-before-teximage.c
index d35f348e0..485f2af23 100644
--- a/tests/bugs/crash-texparameter-before-teximage.c
+++ b/tests/bugs/crash-texparameter-before-teximage.c
@@ -26,9 +26,9 @@ piglit_init(int argc, char **argv)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
- if (glutExtensionSupported("GL_ARB_shadow"))
+ if (piglit_is_extension_supported("GL_ARB_shadow"))
glTexParameteri(GL_TEXTURE_2D, GL_DEPTH_TEXTURE_MODE_ARB, GL_ALPHA);
- if (glutExtensionSupported("GL_ARB_shadow_ambient"))
+ if (piglit_is_extension_supported("GL_ARB_shadow_ambient"))
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FAIL_VALUE_ARB, 0.1);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
diff --git a/tests/bugs/tex1d-2dborder.c b/tests/bugs/tex1d-2dborder.c
index 5a0527946..881ab4709 100644
--- a/tests/bugs/tex1d-2dborder.c
+++ b/tests/bugs/tex1d-2dborder.c
@@ -90,7 +90,7 @@ piglit_display(void)
pass &= test(GL_CLAMP_TO_EDGE, 2, 0);
pass &= test(GL_CLAMP_TO_BORDER, 3, 0);
pass &= test(GL_MIRRORED_REPEAT, 0, 1);
- if (glutExtensionSupported("GL_EXT_texture_mirror_clamp")) {
+ if (piglit_is_extension_supported("GL_EXT_texture_mirror_clamp")) {
pass &= test(GL_MIRROR_CLAMP_EXT, 1, 1);
pass &= test(GL_MIRROR_CLAMP_TO_EDGE_EXT, 2, 1);
pass &= test(GL_MIRROR_CLAMP_TO_BORDER_EXT, 3, 1);
diff --git a/tests/fbo/fbo-3d.c b/tests/fbo/fbo-3d.c
index c5287e294..5cfa88204 100644
--- a/tests/fbo/fbo-3d.c
+++ b/tests/fbo/fbo-3d.c
@@ -58,7 +58,7 @@ create_3d_fbo(void)
GLuint tex, fb;
GLenum status;
int depth;
- pot_depth = glutExtensionSupported("GL_ARB_texture_non_power_of_two") ?
+ pot_depth = piglit_is_extension_supported("GL_ARB_texture_non_power_of_two") ?
NUM_DEPTHS: POT_DEPTHS;
glGenTextures(1, &tex);
diff --git a/tests/fbo/fbo-formats.h b/tests/fbo/fbo-formats.h
index 9f5d91175..cadf30d4d 100644
--- a/tests/fbo/fbo-formats.h
+++ b/tests/fbo/fbo-formats.h
@@ -468,7 +468,7 @@ supported(const struct test_desc *test)
for (i = 0; i < 3; i++) {
if (test->ext[i]) {
- if (!glutExtensionSupported(test->ext[i])) {
+ if (!piglit_is_extension_supported(test->ext[i])) {
return GL_FALSE;
}
}
diff --git a/tests/fbo/fbo-storage-completeness.c b/tests/fbo/fbo-storage-completeness.c
index 8c099cdc3..59aceef7f 100644
--- a/tests/fbo/fbo-storage-completeness.c
+++ b/tests/fbo/fbo-storage-completeness.c
@@ -237,9 +237,9 @@ piglit_init(int argc, char**argv)
piglit_require_extension("GL_EXT_framebuffer_object");
HaveExtension[0] = GL_TRUE;
- HaveExtension[EXT_packed_depth_stencil] = glutExtensionSupported("GL_EXT_packed_depth_stencil");
- HaveExtension[ARB_framebuffer_object] = glutExtensionSupported("GL_ARB_framebuffer_object");
- HaveExtension[ARB_texture_rg] = glutExtensionSupported("GL_ARB_texture_rg");
+ HaveExtension[EXT_packed_depth_stencil] = piglit_is_extension_supported("GL_EXT_packed_depth_stencil");
+ HaveExtension[ARB_framebuffer_object] = piglit_is_extension_supported("GL_ARB_framebuffer_object");
+ HaveExtension[ARB_texture_rg] = piglit_is_extension_supported("GL_ARB_texture_rg");
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
}
diff --git a/tests/fbo/fbo-storage-formats.c b/tests/fbo/fbo-storage-formats.c
index 71bfc4566..4a2b38f26 100644
--- a/tests/fbo/fbo-storage-formats.c
+++ b/tests/fbo/fbo-storage-formats.c
@@ -242,9 +242,9 @@ piglit_init(int argc, char**argv)
piglit_require_extension("GL_EXT_framebuffer_object");
HaveExtension[0] = GL_TRUE;
- HaveExtension[EXT_packed_depth_stencil] = glutExtensionSupported("GL_EXT_packed_depth_stencil");
- HaveExtension[ARB_framebuffer_object] = glutExtensionSupported("GL_ARB_framebuffer_object");
- HaveExtension[ARB_texture_rg] = glutExtensionSupported("GL_ARB_texture_rg");
+ HaveExtension[EXT_packed_depth_stencil] = piglit_is_extension_supported("GL_EXT_packed_depth_stencil");
+ HaveExtension[ARB_framebuffer_object] = piglit_is_extension_supported("GL_ARB_framebuffer_object");
+ HaveExtension[ARB_texture_rg] = piglit_is_extension_supported("GL_ARB_texture_rg");
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
}
diff --git a/tests/general/framebuffer-srgb.c b/tests/general/framebuffer-srgb.c
index a7226dcc8..c741ac68e 100644
--- a/tests/general/framebuffer-srgb.c
+++ b/tests/general/framebuffer-srgb.c
@@ -336,7 +336,7 @@ piglit_display(void)
GLboolean pass = GL_TRUE;
GLboolean have_srgb_ext = GL_FALSE;
- if (glutExtensionSupported("GL_EXT_framebuffer_sRGB"))
+ if (piglit_is_extension_supported("GL_EXT_framebuffer_sRGB"))
have_srgb_ext = GL_TRUE;
if (!have_srgb_ext) {
diff --git a/tests/general/isbufferobj.c b/tests/general/isbufferobj.c
index 4f7141a22..bb369a9b6 100644
--- a/tests/general/isbufferobj.c
+++ b/tests/general/isbufferobj.c
@@ -60,7 +60,7 @@ test(void)
return PIGLIT_FAIL;
}
- if (glutExtensionSupported("GL_EXT_pixel_buffer_object")) {
+ if (piglit_is_extension_supported("GL_EXT_pixel_buffer_object")) {
glBindBuffer(GL_PIXEL_PACK_BUFFER_EXT, buffers[0]);
if (glGetError()) {
printf("%s: glBindBuffer failed\n", TestName);
diff --git a/tests/general/texunits.c b/tests/general/texunits.c
index c2f5bb5ef..667a7b484 100644
--- a/tests/general/texunits.c
+++ b/tests/general/texunits.c
@@ -349,14 +349,14 @@ piglit_display(void)
static void
init(void)
{
- if (glutExtensionSupported("GL_ARB_vertex_shader")) {
+ if (piglit_is_extension_supported("GL_ARB_vertex_shader")) {
glGetIntegerv(GL_MAX_TEXTURE_COORDS, &MaxTextureCoordUnits);
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &MaxTextureImageUnits);
glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &MaxTextureVertexUnits);
glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &MaxTextureCombinedUnits);
}
- else if (glutExtensionSupported("GL_ARB_fragment_shader") ||
- glutExtensionSupported("GL_ARB_fragment_program")) {
+ else if (piglit_is_extension_supported("GL_ARB_fragment_shader") ||
+ piglit_is_extension_supported("GL_ARB_fragment_program")) {
glGetIntegerv(GL_MAX_TEXTURE_COORDS, &MaxTextureCoordUnits);
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &MaxTextureImageUnits);
MaxTextureVertexUnits = 0;
diff --git a/tests/shaders/vp-address-02.c b/tests/shaders/vp-address-02.c
index 28a69174f..eb752573d 100644
--- a/tests/shaders/vp-address-02.c
+++ b/tests/shaders/vp-address-02.c
@@ -147,7 +147,7 @@ piglit_init(int argc, char **argv)
piglit_report_result(PIGLIT_FAIL);
} else if (max_address_registers == 1) {
- if (glutExtensionSupported("GL_NV_vertex_program2_option")) {
+ if (piglit_is_extension_supported("GL_NV_vertex_program2_option")) {
/* this extension requires two address regs */
if (! piglit_automatic)
printf("GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB "
diff --git a/tests/shaders/vp-address-04.c b/tests/shaders/vp-address-04.c
index 353c62e8d..adfc10976 100644
--- a/tests/shaders/vp-address-04.c
+++ b/tests/shaders/vp-address-04.c
@@ -243,7 +243,7 @@ piglit_init(int argc, char **argv)
piglit_report_result(PIGLIT_FAIL);
} else if (max_address_registers == 1) {
- if (glutExtensionSupported("GL_NV_vertex_program2_option")) {
+ if (piglit_is_extension_supported("GL_NV_vertex_program2_option")) {
/* this extension requires two address regs */
if (! piglit_automatic)
printf("GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB "
diff --git a/tests/texturing/array-texture.c b/tests/texturing/array-texture.c
index b6c03f253..9029b5844 100644
--- a/tests/texturing/array-texture.c
+++ b/tests/texturing/array-texture.c
@@ -328,7 +328,7 @@ piglit_init(int argc, char **argv)
{
piglit_require_extension("GL_EXT_texture_array");
- have_MESA_texture_array = glutExtensionSupported("GL_MESA_texture_array");
+ have_MESA_texture_array = piglit_is_extension_supported("GL_MESA_texture_array");
/* Make shader programs */
frag_shader_2d_array =
diff --git a/tests/texturing/crossbar.c b/tests/texturing/crossbar.c
index e404bfff1..3bc26dfe4 100644
--- a/tests/texturing/crossbar.c
+++ b/tests/texturing/crossbar.c
@@ -217,13 +217,13 @@ static void Init( void )
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
printf("GL_VERSION = %s\n", ver_string);
- if ( (!glutExtensionSupported("GL_ARB_multitexture")
+ if ( (!piglit_is_extension_supported("GL_ARB_multitexture")
&& (ver < 1.3))
- || (!glutExtensionSupported("GL_ARB_texture_env_combine")
- && !glutExtensionSupported("GL_EXT_texture_env_combine")
+ || (!piglit_is_extension_supported("GL_ARB_texture_env_combine")
+ && !piglit_is_extension_supported("GL_EXT_texture_env_combine")
&& (ver < 1.3))
- || (!glutExtensionSupported("GL_ARB_texture_env_crossbar")
- && !glutExtensionSupported("GL_NV_texture_env_combine4")
+ || (!piglit_is_extension_supported("GL_ARB_texture_env_crossbar")
+ && !piglit_is_extension_supported("GL_NV_texture_env_combine4")
&& (ver < 1.4)) ) {
printf("\nSorry, this program requires GL_ARB_multitexture and either\n"
"GL_ARB_texture_env_combine or GL_EXT_texture_env_combine (or OpenGL 1.3).\n"
diff --git a/tests/texturing/tex-srgb.c b/tests/texturing/tex-srgb.c
index 1f5350837..3f98ac726 100644
--- a/tests/texturing/tex-srgb.c
+++ b/tests/texturing/tex-srgb.c
@@ -91,7 +91,7 @@ srgb_tex_test(int srgb_format)
GLuint tex;
GLboolean have_decode;
- have_decode = glutExtensionSupported("GL_EXT_texture_sRGB_decode");
+ have_decode = piglit_is_extension_supported("GL_EXT_texture_sRGB_decode");
glGenTextures(1, &tex);
diff --git a/tests/texturing/texdepth.c b/tests/texturing/texdepth.c
index bc13ba351..f7bdaafab 100644
--- a/tests/texturing/texdepth.c
+++ b/tests/texturing/texdepth.c
@@ -387,13 +387,13 @@ piglit_init(int argc, char **argv)
printf("Press 't' to cycle through test images\n");
piglit_require_extension("GL_ARB_depth_texture");
- HaveShadow = glutExtensionSupported("GL_ARB_shadow");
+ HaveShadow = piglit_is_extension_supported("GL_ARB_shadow");
if (!HaveShadow)
printf("GL_ARB_shadow not supported.\n");
- HaveShadowAmbient = glutExtensionSupported("GL_ARB_shadow_ambient");
+ HaveShadowAmbient = piglit_is_extension_supported("GL_ARB_shadow_ambient");
if (!HaveShadowAmbient)
printf("GL_ARB_shadow_ambient not supported.\n");
- HaveShadowFuncs = glutExtensionSupported("GL_EXT_shadow_funcs");
+ HaveShadowFuncs = piglit_is_extension_supported("GL_EXT_shadow_funcs");
if (!HaveShadowFuncs)
printf("GL_EXT_shadow_funcs not supported.\n");