[Piglit] [PATCH] Fix require extension usage -- prepend GL_ and GLX_ in missing places
Emil Velikov
emil.l.velikov at gmail.com
Sat May 24 16:31:55 PDT 2014
On 24/05/14 22:10, Ilia Mirkin wrote:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>
> This doesn't actually end up mattering for the GLX tests because they do a
> substr-based search in the overall extension string. But for the GL tests it
> matters because it looks for exact matches in an array.
>
> May as well fix the GLX tests while I'm at it, in case they ever move to the
> array mechanism.
>
Nice catches Ilia.
With this patch - all egl, gl and glx extensions have their respective prefix.
This way people (like me) should have less of a incentive to forget them.
The buggers in arb_clear_buffer_object/formats.c are my fault :'(
FWIW
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
> tests/glx/glx-buffer-age.c | 2 +-
> tests/glx/glx-copy-sub-buffer.c | 2 +-
> tests/glx/glx-multithread-makecurrent-1.c | 2 +-
> tests/glx/glx-multithread-makecurrent-2.c | 2 +-
> tests/glx/glx-multithread-makecurrent-3.c | 2 +-
> tests/glx/glx-multithread-makecurrent-4.c | 2 +-
> tests/spec/arb_clear_buffer_object/formats.c | 6 +++---
> tests/spec/arb_instanced_arrays/vertex-attrib-divisor-index-error.c | 2 +-
> tests/spec/arb_texture_rectangle/texture-base-level-error.c | 2 +-
> tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-p-types.c | 2 +-
> .../vertex-attrib-pointer-type-size-match.c | 2 +-
> 11 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/tests/glx/glx-buffer-age.c b/tests/glx/glx-buffer-age.c
> index 74902bd..8008500 100644
> --- a/tests/glx/glx-buffer-age.c
> +++ b/tests/glx/glx-buffer-age.c
> @@ -119,7 +119,7 @@ main(int argc, char **argv)
> }
>
> dpy = piglit_get_glx_display();
> - piglit_require_glx_extension(dpy, "EXT_buffer_age");
> + piglit_require_glx_extension(dpy, "GLX_EXT_buffer_age");
> visinfo = piglit_get_glx_visual(dpy);
> window = piglit_get_glx_window(dpy, visinfo);
>
> diff --git a/tests/glx/glx-copy-sub-buffer.c b/tests/glx/glx-copy-sub-buffer.c
> index a991df5..5bf28f2 100644
> --- a/tests/glx/glx-copy-sub-buffer.c
> +++ b/tests/glx/glx-copy-sub-buffer.c
> @@ -129,7 +129,7 @@ main(int argc, char **argv)
> piglit_report_result(PIGLIT_FAIL);
> }
>
> - piglit_require_glx_extension(dpy, "MESA_copy_sub_buffer");
> + piglit_require_glx_extension(dpy, "GLX_MESA_copy_sub_buffer");
> CopySubBuffer = (PFNGLXCOPYSUBBUFFERMESAPROC)
> glXGetProcAddressARB((GLubyte *)"glXCopySubBufferMESA");
>
> diff --git a/tests/glx/glx-multithread-makecurrent-1.c b/tests/glx/glx-multithread-makecurrent-1.c
> index 97dc1cd..acfc279 100644
> --- a/tests/glx/glx-multithread-makecurrent-1.c
> +++ b/tests/glx/glx-multithread-makecurrent-1.c
> @@ -109,7 +109,7 @@ draw(Display *dpy)
> glXMakeCurrent(dpy, win, ctx);
> piglit_dispatch_default_init(PIGLIT_DISPATCH_GL);
>
> - piglit_require_glx_extension(dpy, "MESA_multithread_makecurrent");
> + piglit_require_glx_extension(dpy, "GLX_MESA_multithread_makecurrent");
>
> /* Clear background to gray */
> glClearColor(0.5, 0.5, 0.5, 1.0);
> diff --git a/tests/glx/glx-multithread-makecurrent-2.c b/tests/glx/glx-multithread-makecurrent-2.c
> index d9714ec..60da0ae 100644
> --- a/tests/glx/glx-multithread-makecurrent-2.c
> +++ b/tests/glx/glx-multithread-makecurrent-2.c
> @@ -110,7 +110,7 @@ draw(Display *dpy)
> glXMakeCurrent(dpy, win, ctx);
> piglit_dispatch_default_init(PIGLIT_DISPATCH_GL);
>
> - piglit_require_glx_extension(dpy, "MESA_multithread_makecurrent");
> + piglit_require_glx_extension(dpy, "GLX_MESA_multithread_makecurrent");
>
> /* Clear background to gray */
> glClearColor(0.5, 0.5, 0.5, 1.0);
> diff --git a/tests/glx/glx-multithread-makecurrent-3.c b/tests/glx/glx-multithread-makecurrent-3.c
> index dc93d33..12ffe86 100644
> --- a/tests/glx/glx-multithread-makecurrent-3.c
> +++ b/tests/glx/glx-multithread-makecurrent-3.c
> @@ -102,7 +102,7 @@ draw(Display *dpy)
> glXMakeCurrent(dpy, win, ctx);
> piglit_dispatch_default_init(PIGLIT_DISPATCH_GL);
>
> - piglit_require_glx_extension(dpy, "MESA_multithread_makecurrent");
> + piglit_require_glx_extension(dpy, "GLX_MESA_multithread_makecurrent");
>
> /* Clear background to gray */
> glClearColor(0.5, 0.5, 0.5, 1.0);
> diff --git a/tests/glx/glx-multithread-makecurrent-4.c b/tests/glx/glx-multithread-makecurrent-4.c
> index 53cb297..c251147 100644
> --- a/tests/glx/glx-multithread-makecurrent-4.c
> +++ b/tests/glx/glx-multithread-makecurrent-4.c
> @@ -102,7 +102,7 @@ draw(Display *dpy)
> glXMakeCurrent(dpy, win, ctx);
> piglit_dispatch_default_init(PIGLIT_DISPATCH_GL);
>
> - piglit_require_glx_extension(dpy, "MESA_multithread_makecurrent");
> + piglit_require_glx_extension(dpy, "GLX_MESA_multithread_makecurrent");
>
> /* Clear background to gray */
> glClearColor(0.5, 0.5, 0.5, 1.0);
> diff --git a/tests/spec/arb_clear_buffer_object/formats.c b/tests/spec/arb_clear_buffer_object/formats.c
> index c56ff9a..fb36b00 100644
> --- a/tests/spec/arb_clear_buffer_object/formats.c
> +++ b/tests/spec/arb_clear_buffer_object/formats.c
> @@ -65,7 +65,7 @@ static const struct {
> {GL_LUMINANCE32F_ARB, GL_LUMINANCE, GL_FLOAT, 4, false, {NULL, "GL_ARB_texture_float", NULL}},
> {GL_LUMINANCE_ALPHA32F_ARB, GL_LUMINANCE_ALPHA, GL_FLOAT, 8, false, {NULL, "GL_ARB_texture_float", NULL}},
> {GL_INTENSITY32F_ARB, GL_RED, GL_FLOAT, 4, false, {NULL, "GL_ARB_texture_float", NULL}},
> - {GL_RGB32F, GL_RGB, GL_FLOAT, 12, true, {NULL, "GL_ARB_texture_float", "ARB_texture_buffer_object_rgb32"}},
> + {GL_RGB32F, GL_RGB, GL_FLOAT, 12, true, {NULL, "GL_ARB_texture_float", "GL_ARB_texture_buffer_object_rgb32"}},
> {GL_RGBA32F_ARB, GL_RGBA, GL_FLOAT, 16, true, {NULL, "GL_ARB_texture_float", NULL}},
> /* texture_half_float */
> {GL_ALPHA16F_ARB, GL_ALPHA, GL_HALF_FLOAT, 2, false, {NULL, "GL_ARB_texture_float", "GL_ARB_half_float_pixel"}},
> @@ -102,8 +102,8 @@ static const struct {
> {GL_INTENSITY16UI_EXT, GL_RED_INTEGER, GL_UNSIGNED_SHORT, 2, false, {NULL, "GL_EXT_texture_integer", NULL}},
> {GL_INTENSITY32UI_EXT, GL_RED_INTEGER, GL_UNSIGNED_INT, 4, false, {NULL, "GL_EXT_texture_integer", NULL}},
>
> - {GL_RGB32I, GL_RGB_INTEGER, GL_INT, 12, true, {NULL, "GL_EXT_texture_integer", "ARB_texture_buffer_object_rgb32"}},
> - {GL_RGB32UI, GL_RGB_INTEGER, GL_UNSIGNED_INT, 12, true, {NULL, "GL_EXT_texture_integer", "ARB_texture_buffer_object_rgb32"}},
> + {GL_RGB32I, GL_RGB_INTEGER, GL_INT, 12, true, {NULL, "GL_EXT_texture_integer", "GL_ARB_texture_buffer_object_rgb32"}},
> + {GL_RGB32UI, GL_RGB_INTEGER, GL_UNSIGNED_INT, 12, true, {NULL, "GL_EXT_texture_integer", "GL_ARB_texture_buffer_object_rgb32"}},
>
> {GL_RGBA8I_EXT, GL_RGBA_INTEGER, GL_BYTE, 4, true, {NULL, "GL_EXT_texture_integer", NULL}},
> {GL_RGBA16I_EXT, GL_RGBA_INTEGER, GL_SHORT, 8, true, {NULL, "GL_EXT_texture_integer", NULL}},
> diff --git a/tests/spec/arb_instanced_arrays/vertex-attrib-divisor-index-error.c b/tests/spec/arb_instanced_arrays/vertex-attrib-divisor-index-error.c
> index 5d35a4e..993bc57 100644
> --- a/tests/spec/arb_instanced_arrays/vertex-attrib-divisor-index-error.c
> +++ b/tests/spec/arb_instanced_arrays/vertex-attrib-divisor-index-error.c
> @@ -46,7 +46,7 @@ piglit_init(int argc, char **argv)
> bool pass = true;
>
> if(piglit_get_gl_version() < 33)
> - piglit_require_extension("ARB_instanced_arrays");
> + piglit_require_extension("GL_ARB_instanced_arrays");
>
> glVertexAttribDivisor(GL_MAX_VERTEX_ATTRIBS, 0);
> pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
> diff --git a/tests/spec/arb_texture_rectangle/texture-base-level-error.c b/tests/spec/arb_texture_rectangle/texture-base-level-error.c
> index 734c1aa..800251f 100644
> --- a/tests/spec/arb_texture_rectangle/texture-base-level-error.c
> +++ b/tests/spec/arb_texture_rectangle/texture-base-level-error.c
> @@ -91,7 +91,7 @@ piglit_init(int argc, char **argv)
> };
>
> if (piglit_get_gl_version() < 33)
> - piglit_require_extension("ARB_texture_rectangle");
> + piglit_require_extension("GL_ARB_texture_rectangle");
>
> /* "...the error INVALID_ENUM is generated if the TEXTURE_WRAP_S,
> * TEXTURE_WRAP_T, or TEXTURE_WRAP_R parameter is set to REPEAT or
> diff --git a/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-p-types.c b/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-p-types.c
> index f10304f..09b8a2d 100644
> --- a/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-p-types.c
> +++ b/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-p-types.c
> @@ -55,7 +55,7 @@ piglit_init(int argc, char **argv)
> };
>
> if(piglit_get_gl_version() < 33)
> - piglit_require_extension("ARB_vertex_type_2_10_10_10_rev");
> + piglit_require_extension("GL_ARB_vertex_type_2_10_10_10_rev");
>
> for (i = 0; i < ARRAY_SIZE(valid_types); i++) {
> glVertexAttribP1ui(0, valid_types[i], true, x);
> diff --git a/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c b/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c
> index c8eceb8..098e5f7 100644
> --- a/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c
> +++ b/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c
> @@ -55,7 +55,7 @@ piglit_init(int argc, char **argv)
> };
>
> if(piglit_get_gl_version() < 33)
> - piglit_require_extension("ARB_vertex_type_2_10_10_10_rev");
> + piglit_require_extension("GL_ARB_vertex_type_2_10_10_10_rev");
>
> for (i = 0; i < ARRAY_SIZE(valid_sizes); i++) {
> glVertexAttribPointer(0, valid_sizes[i],
>
More information about the Piglit
mailing list