diff options
author | Eric Anholt <eric@anholt.net> | 2013-05-10 17:30:55 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2013-06-17 14:31:18 -0700 |
commit | b677a1042b7cbc4e5be01c7a9ff78fdc1b3dba0e (patch) | |
tree | e921927a13bc3454da45e0b8115f33fa39f7e0b0 | |
parent | b60dd3a48d0d746d99e802aacb231b3a45aa6807 (diff) |
piglit: Make callers of piglit_dispatch_default_init() specify the API.
To automatically detect the current API, we'd need to make calls to
piglit_is_gles() and piglit_get_gl_version(), while bypassing the
dispatch mechanism we're trying to initialize. That seems tricky,
while the context type is probably going to be known by the caller
when we extend dispatch to GLES tests.
Reviewed-by: Paul Berry <stereotype441@gmail.com>
44 files changed, 46 insertions, 46 deletions
diff --git a/tests/egl/egl-util.c b/tests/egl/egl-util.c index 4f06cab16..012f54703 100644 --- a/tests/egl/egl-util.c +++ b/tests/egl/egl-util.c @@ -253,7 +253,7 @@ egl_util_run(const struct egl_test *test, int argc, char *argv[]) piglit_report_result(PIGLIT_FAIL); } - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); result = event_loop(&state, test); diff --git a/tests/egl/spec/egl_khr_create_context/default-major-version-gl.c b/tests/egl/spec/egl_khr_create_context/default-major-version-gl.c index b0633669d..1162d7b56 100644 --- a/tests/egl/spec/egl_khr_create_context/default-major-version-gl.c +++ b/tests/egl/spec/egl_khr_create_context/default-major-version-gl.c @@ -63,7 +63,7 @@ int main(int argc, char **argv) piglit_report_result(PIGLIT_FAIL); } - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); version_string = (char *) glGetString(GL_VERSION); diff --git a/tests/egl/spec/egl_khr_create_context/default-major-version-gles.c b/tests/egl/spec/egl_khr_create_context/default-major-version-gles.c index e7da84570..da392e9cb 100644 --- a/tests/egl/spec/egl_khr_create_context/default-major-version-gles.c +++ b/tests/egl/spec/egl_khr_create_context/default-major-version-gles.c @@ -60,7 +60,7 @@ int main(int argc, char **argv) piglit_report_result(PIGLIT_FAIL); } - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); version_string = (char *) glGetString(GL_VERSION); diff --git a/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c b/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c index 77050df94..37369d591 100644 --- a/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c +++ b/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c @@ -65,7 +65,7 @@ int main(int argc, char **argv) piglit_report_result(PIGLIT_FAIL); } - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); version_string = (char *) glGetString(GL_VERSION); diff --git a/tests/egl/spec/egl_khr_create_context/default-minor-version-gles.c b/tests/egl/spec/egl_khr_create_context/default-minor-version-gles.c index 5fbb8d443..0d02625e2 100644 --- a/tests/egl/spec/egl_khr_create_context/default-minor-version-gles.c +++ b/tests/egl/spec/egl_khr_create_context/default-minor-version-gles.c @@ -65,7 +65,7 @@ int main(int argc, char **argv) piglit_report_result(PIGLIT_FAIL); } - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); version_string = (char *) glGetString(GL_VERSION); diff --git a/tests/egl/spec/egl_khr_create_context/valid-attribute-empty-gl.c b/tests/egl/spec/egl_khr_create_context/valid-attribute-empty-gl.c index fafb01aae..5e1ebb34b 100644 --- a/tests/egl/spec/egl_khr_create_context/valid-attribute-empty-gl.c +++ b/tests/egl/spec/egl_khr_create_context/valid-attribute-empty-gl.c @@ -55,7 +55,7 @@ int main(int argc, char **argv) piglit_report_result(PIGLIT_FAIL); } - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); version_string = (char *) glGetString(GL_VERSION); diff --git a/tests/egl/spec/egl_khr_create_context/valid-attribute-empty-gles.c b/tests/egl/spec/egl_khr_create_context/valid-attribute-empty-gles.c index 73892b9dc..5d631e6f0 100644 --- a/tests/egl/spec/egl_khr_create_context/valid-attribute-empty-gles.c +++ b/tests/egl/spec/egl_khr_create_context/valid-attribute-empty-gles.c @@ -54,7 +54,7 @@ int main(int argc, char **argv) piglit_report_result(PIGLIT_FAIL); } - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); version_string = (char *) glGetString(GL_VERSION); diff --git a/tests/egl/spec/egl_khr_create_context/valid-attribute-null-gl.c b/tests/egl/spec/egl_khr_create_context/valid-attribute-null-gl.c index 7db99fe06..d3ff85160 100644 --- a/tests/egl/spec/egl_khr_create_context/valid-attribute-null-gl.c +++ b/tests/egl/spec/egl_khr_create_context/valid-attribute-null-gl.c @@ -52,7 +52,7 @@ int main(int argc, char **argv) piglit_report_result(PIGLIT_FAIL); } - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); version_string = (char *) glGetString(GL_VERSION); diff --git a/tests/egl/spec/egl_khr_create_context/valid-attribute-null-gles.c b/tests/egl/spec/egl_khr_create_context/valid-attribute-null-gles.c index 3ab748256..4816976c0 100644 --- a/tests/egl/spec/egl_khr_create_context/valid-attribute-null-gles.c +++ b/tests/egl/spec/egl_khr_create_context/valid-attribute-null-gles.c @@ -51,7 +51,7 @@ int main(int argc, char **argv) piglit_report_result(PIGLIT_FAIL); } - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); version_string = (char *) glGetString(GL_VERSION); diff --git a/tests/egl/spec/egl_khr_create_context/valid-flag-forward-compatible-gl.c b/tests/egl/spec/egl_khr_create_context/valid-flag-forward-compatible-gl.c index 2f2c0a713..7f0f148a0 100644 --- a/tests/egl/spec/egl_khr_create_context/valid-flag-forward-compatible-gl.c +++ b/tests/egl/spec/egl_khr_create_context/valid-flag-forward-compatible-gl.c @@ -43,7 +43,7 @@ static bool try_flag(int flag) piglit_report_result(PIGLIT_FAIL); } - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); gl_version = piglit_get_gl_version(); } diff --git a/tests/egl/spec/egl_khr_create_context/verify-gl-flavor.c b/tests/egl/spec/egl_khr_create_context/verify-gl-flavor.c index 69d581b14..27ea0b18f 100644 --- a/tests/egl/spec/egl_khr_create_context/verify-gl-flavor.c +++ b/tests/egl/spec/egl_khr_create_context/verify-gl-flavor.c @@ -235,7 +235,7 @@ check_flavor(int requested_version, enum gl_api requested_api) /* We must postpone initialization of piglit-dispatch until * a context is current. */ - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); is_dispatch_init = true; } diff --git a/tests/general/windowoverlap.c b/tests/general/windowoverlap.c index d5fe877da..6b08a75fd 100644 --- a/tests/general/windowoverlap.c +++ b/tests/general/windowoverlap.c @@ -181,7 +181,7 @@ int main(int argc, char *argv[]) glutInitWindowSize(MainWidth, MainHeight); glutInitDisplayMode(PIGLIT_GL_VISUAL_RGB); glutCreateWindow(argv[0]); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); glutReshapeFunc(Reshape); glutDisplayFunc(RedisplayMain); if (!Automatic) diff --git a/tests/glean/tbase.h b/tests/glean/tbase.h index 5e2feff2a..b5fe2c508 100644 --- a/tests/glean/tbase.h +++ b/tests/glean/tbase.h @@ -313,7 +313,7 @@ public: // Make sure glew is initialized so we can call // GL functions safely. - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); // Check if test is applicable to this context if (!isApplicable()) diff --git a/tests/glx/glx-copy-sub-buffer.c b/tests/glx/glx-copy-sub-buffer.c index 38b4b5981..a991df5ce 100644 --- a/tests/glx/glx-copy-sub-buffer.c +++ b/tests/glx/glx-copy-sub-buffer.c @@ -52,7 +52,7 @@ draw(Display *dpy) ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, win_one, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); glClearColor(1.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); diff --git a/tests/glx/glx-destroycontext-1.c b/tests/glx/glx-destroycontext-1.c index 91dc82fa5..fc27b6e59 100644 --- a/tests/glx/glx-destroycontext-1.c +++ b/tests/glx/glx-destroycontext-1.c @@ -48,7 +48,7 @@ draw(Display *dpy) ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, win, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); glClearColor(1.0, 0.0, 0.0, 1.0); glClear(GL_COLOR_BUFFER_BIT); glXMakeCurrent(dpy, None, NULL); diff --git a/tests/glx/glx-destroycontext-2.c b/tests/glx/glx-destroycontext-2.c index 9c591a0d7..e4c6d372a 100644 --- a/tests/glx/glx-destroycontext-2.c +++ b/tests/glx/glx-destroycontext-2.c @@ -48,7 +48,7 @@ draw(Display *dpy) ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, win, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); glClearColor(1.0, 0.0, 0.0, 1.0); glClear(GL_COLOR_BUFFER_BIT); glXDestroyContext(dpy, ctx); diff --git a/tests/glx/glx-fbo-binding.c b/tests/glx/glx-fbo-binding.c index 090cd0971..bfdc4dd0a 100644 --- a/tests/glx/glx-fbo-binding.c +++ b/tests/glx/glx-fbo-binding.c @@ -111,7 +111,7 @@ main(int argc, char **argv) ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, Windows[0], ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); piglit_glx_event_loop(dpy, draw); diff --git a/tests/glx/glx-make-current.c b/tests/glx/glx-make-current.c index d56fcdbc0..dde99b4f5 100644 --- a/tests/glx/glx-make-current.c +++ b/tests/glx/glx-make-current.c @@ -49,7 +49,7 @@ draw(Display *dpy) ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, win_one, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); glClearColor(0.0, 1.0, 0.0, 1.0); glClear(GL_COLOR_BUFFER_BIT); diff --git a/tests/glx/glx-make-glxdrawable-current.c b/tests/glx/glx-make-glxdrawable-current.c index 919458d02..fc339be7f 100644 --- a/tests/glx/glx-make-glxdrawable-current.c +++ b/tests/glx/glx-make-glxdrawable-current.c @@ -76,7 +76,7 @@ draw(Display *dpy) ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, glxwin_one, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); glClearColor(0.0, 1.0, 0.0, 1.0); glClear(GL_COLOR_BUFFER_BIT); diff --git a/tests/glx/glx-multi-context-ib-1.c b/tests/glx/glx-multi-context-ib-1.c index 1e77b7a27..2b3c00ea4 100644 --- a/tests/glx/glx-multi-context-ib-1.c +++ b/tests/glx/glx-multi-context-ib-1.c @@ -189,7 +189,7 @@ main(int argc, char **argv) ctx1 = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, win, ctx0); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); piglit_require_extension("GL_ARB_vertex_buffer_object"); context0_init(); glXMakeCurrent(dpy, win, ctx1); diff --git a/tests/glx/glx-multithread-makecurrent-1.c b/tests/glx/glx-multithread-makecurrent-1.c index f8132dbe1..97dc1cd5a 100644 --- a/tests/glx/glx-multithread-makecurrent-1.c +++ b/tests/glx/glx-multithread-makecurrent-1.c @@ -107,7 +107,7 @@ draw(Display *dpy) ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, win, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); piglit_require_glx_extension(dpy, "MESA_multithread_makecurrent"); diff --git a/tests/glx/glx-multithread-makecurrent-2.c b/tests/glx/glx-multithread-makecurrent-2.c index 1bb451940..d9714ece6 100644 --- a/tests/glx/glx-multithread-makecurrent-2.c +++ b/tests/glx/glx-multithread-makecurrent-2.c @@ -108,7 +108,7 @@ draw(Display *dpy) ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, win, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); piglit_require_glx_extension(dpy, "MESA_multithread_makecurrent"); diff --git a/tests/glx/glx-multithread-makecurrent-3.c b/tests/glx/glx-multithread-makecurrent-3.c index a7df147dd..dc93d3336 100644 --- a/tests/glx/glx-multithread-makecurrent-3.c +++ b/tests/glx/glx-multithread-makecurrent-3.c @@ -100,7 +100,7 @@ draw(Display *dpy) ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, win, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); piglit_require_glx_extension(dpy, "MESA_multithread_makecurrent"); diff --git a/tests/glx/glx-multithread-makecurrent-4.c b/tests/glx/glx-multithread-makecurrent-4.c index 7ebeb5fd4..53cb297d5 100644 --- a/tests/glx/glx-multithread-makecurrent-4.c +++ b/tests/glx/glx-multithread-makecurrent-4.c @@ -100,7 +100,7 @@ draw(Display *dpy) ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, win, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); piglit_require_glx_extension(dpy, "MESA_multithread_makecurrent"); diff --git a/tests/glx/glx-multithread-shader-compile.c b/tests/glx/glx-multithread-shader-compile.c index b04c1b243..3c77af3cd 100644 --- a/tests/glx/glx-multithread-shader-compile.c +++ b/tests/glx/glx-multithread-shader-compile.c @@ -72,7 +72,7 @@ thread_func(void *arg) * on the same type of context. */ pthread_mutex_lock(&mutex); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); pthread_mutex_unlock(&mutex); vert_shader = piglit_compile_shader_text(GL_VERTEX_SHADER, vert_shader_text); diff --git a/tests/glx/glx-multithread.c b/tests/glx/glx-multithread.c index 3d162b05f..f88f8da9b 100644 --- a/tests/glx/glx-multithread.c +++ b/tests/glx/glx-multithread.c @@ -79,7 +79,7 @@ draw(Display *dpy) ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, win, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); /* Clear background to gray */ glClearColor(0.5, 0.5, 0.5, 1.0); diff --git a/tests/glx/glx-shader-sharing.c b/tests/glx/glx-shader-sharing.c index c1ed9fac8..1b180aed3 100644 --- a/tests/glx/glx-shader-sharing.c +++ b/tests/glx/glx-shader-sharing.c @@ -88,7 +88,7 @@ draw(Display *dpy) */ glXMakeCurrent(dpy, win, ctx1); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); if (piglit_get_gl_version() < 20) { printf("%s: Requires OpenGL 2.0\n", TestName); diff --git a/tests/glx/glx-swap-event.c b/tests/glx/glx-swap-event.c index e8f8bd47a..310e634e2 100644 --- a/tests/glx/glx-swap-event.c +++ b/tests/glx/glx-swap-event.c @@ -533,7 +533,7 @@ main(int argc, char *argv[]) piglit_report_result(PIGLIT_FAIL); } } - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); event_loop(dpy, glxWin); glXDestroyContext(dpy, ctx); diff --git a/tests/glx/glx-swap-pixmap-bad.c b/tests/glx/glx-swap-pixmap-bad.c index bc471fc59..52a0749d8 100644 --- a/tests/glx/glx-swap-pixmap-bad.c +++ b/tests/glx/glx-swap-pixmap-bad.c @@ -73,7 +73,7 @@ main(int argc, char **argv) ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, g, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); /* Clear to green */ glClearColor(0.0, 1.0, 0.0, 0.0); diff --git a/tests/glx/glx-swap-pixmap.c b/tests/glx/glx-swap-pixmap.c index 855396a0d..7635e0dd8 100644 --- a/tests/glx/glx-swap-pixmap.c +++ b/tests/glx/glx-swap-pixmap.c @@ -67,7 +67,7 @@ main(int argc, char **argv) ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, g, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); /* Clear to green */ glClearColor(0.0, 1.0, 0.0, 0.0); diff --git a/tests/glx/glx-swap-singlebuffer.c b/tests/glx/glx-swap-singlebuffer.c index 73a065da0..a747149c6 100644 --- a/tests/glx/glx-swap-singlebuffer.c +++ b/tests/glx/glx-swap-singlebuffer.c @@ -48,7 +48,7 @@ draw(Display *dpy) ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, win, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); /* Clear to green */ glClearColor(0.0, 1.0, 0.0, 0.0); diff --git a/tests/glx/glx-tfp.c b/tests/glx/glx-tfp.c index 659c45204..413d92048 100644 --- a/tests/glx/glx-tfp.c +++ b/tests/glx/glx-tfp.c @@ -320,7 +320,7 @@ int main(int argc, char**argv) glXMakeCurrent(dpy, win, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); if (piglit_automatic) piglit_glx_set_no_input(); diff --git a/tests/glx/glx-visuals-depth.c b/tests/glx/glx-visuals-depth.c index e7dad45a0..8db98bb2a 100644 --- a/tests/glx/glx-visuals-depth.c +++ b/tests/glx/glx-visuals-depth.c @@ -50,7 +50,7 @@ draw(Display *dpy, GLXFBConfig config) float *left, *right; bool pass = true; - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); glXGetFBConfigAttrib(dpy, config, GLX_DEPTH_SIZE, &dbits); piglit_ortho_projection(piglit_width, piglit_height, false); diff --git a/tests/glx/glx-visuals-stencil.c b/tests/glx/glx-visuals-stencil.c index d82675b16..12fcfd376 100644 --- a/tests/glx/glx-visuals-stencil.c +++ b/tests/glx/glx-visuals-stencil.c @@ -50,7 +50,7 @@ draw(Display *dpy, GLXFBConfig config) float *left, *right; bool pass = true; - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); glXGetFBConfigAttrib(dpy, config, GLX_STENCIL_SIZE, &sbits); piglit_ortho_projection(piglit_width, piglit_height, false); diff --git a/tests/spec/glx_arb_create_context/default-major-version.c b/tests/spec/glx_arb_create_context/default-major-version.c index df6aabd93..07bff27ea 100644 --- a/tests/spec/glx_arb_create_context/default-major-version.c +++ b/tests/spec/glx_arb_create_context/default-major-version.c @@ -52,7 +52,7 @@ int main(int argc, char **argv) */ ctx = glXCreateContextAttribsARB(dpy, fbconfig, NULL, True, attribs); glXMakeContextCurrent(dpy, glxWin, glxWin, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); version_string = (char *) glGetString(GL_VERSION); diff --git a/tests/spec/glx_arb_create_context/default-minor-version.c b/tests/spec/glx_arb_create_context/default-minor-version.c index 35c800e1b..f32e99152 100644 --- a/tests/spec/glx_arb_create_context/default-minor-version.c +++ b/tests/spec/glx_arb_create_context/default-minor-version.c @@ -57,7 +57,7 @@ int main(int argc, char **argv) } glXMakeContextCurrent(dpy, glxWin, glxWin, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); version_string = (char *) glGetString(GL_VERSION); diff --git a/tests/spec/glx_oml_sync_control/common.c b/tests/spec/glx_oml_sync_control/common.c index db4c3aabb..d5011a8d0 100644 --- a/tests/spec/glx_oml_sync_control/common.c +++ b/tests/spec/glx_oml_sync_control/common.c @@ -80,7 +80,7 @@ piglit_oml_sync_control_test_run(enum piglit_result (*draw)(Display *dpy)) ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, win, ctx); - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); XMapWindow(dpy, win); diff --git a/tests/texturing/getteximage-luminance.c b/tests/texturing/getteximage-luminance.c index 0c6033d4c..389c3a269 100644 --- a/tests/texturing/getteximage-luminance.c +++ b/tests/texturing/getteximage-luminance.c @@ -251,5 +251,5 @@ piglit_display(void) void piglit_init(int argc, char **argv) { - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); } diff --git a/tests/util/piglit-dispatch-init.c b/tests/util/piglit-dispatch-init.c index 1430a3630..898481534 100644 --- a/tests/util/piglit-dispatch-init.c +++ b/tests/util/piglit-dispatch-init.c @@ -174,14 +174,14 @@ get_core_proc_address(const char *function_name, int gl_10x_version) * on the first call. */ void -piglit_dispatch_default_init() +piglit_dispatch_default_init(piglit_dispatch_api api) { static bool already_initialized = false; if (already_initialized) return; - piglit_dispatch_init(PIGLIT_DISPATCH_GL, + piglit_dispatch_init(api, get_core_proc_address, get_ext_proc_address, default_unsupported, diff --git a/tests/util/piglit-dispatch.h b/tests/util/piglit-dispatch.h index 98a980f0c..eed2023ce 100644 --- a/tests/util/piglit-dispatch.h +++ b/tests/util/piglit-dispatch.h @@ -156,7 +156,7 @@ piglit_dispatch_resolve_function(const char *name); #include "generated_dispatch.h" -void piglit_dispatch_default_init(); +void piglit_dispatch_default_init(piglit_dispatch_api api); /* Prevent gl.h from being included, since it will attempt to define * the functions we've already defined. diff --git a/tests/util/piglit-framework-gl/piglit_fbo_framework.c b/tests/util/piglit-framework-gl/piglit_fbo_framework.c index 405eef43f..a8733542b 100644 --- a/tests/util/piglit-framework-gl/piglit_fbo_framework.c +++ b/tests/util/piglit-framework-gl/piglit_fbo_framework.c @@ -71,7 +71,7 @@ init_gl(struct piglit_wfl_framework *wfl_fw) GLenum status; #ifdef PIGLIT_USE_OPENGL - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); if (piglit_get_gl_version() < 20) return false; diff --git a/tests/util/piglit-framework-gl/piglit_glut_framework.c b/tests/util/piglit-framework-gl/piglit_glut_framework.c index ff48abbbc..a28a17703 100644 --- a/tests/util/piglit-framework-gl/piglit_glut_framework.c +++ b/tests/util/piglit-framework-gl/piglit_glut_framework.c @@ -126,7 +126,7 @@ init_glut(void) glutKeyboardFunc(piglit_escape_exit_key); #ifdef PIGLIT_USE_OPENGL - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); #endif } diff --git a/tests/util/piglit-framework-gl/piglit_wfl_framework.c b/tests/util/piglit-framework-gl/piglit_wfl_framework.c index 801a25807..2cce282e9 100644 --- a/tests/util/piglit-framework-gl/piglit_wfl_framework.c +++ b/tests/util/piglit-framework-gl/piglit_wfl_framework.c @@ -361,7 +361,7 @@ make_context_current_singlepass(struct piglit_wfl_framework *wfl_fw, wfl_fw->context); #ifdef PIGLIT_USE_OPENGL - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); #endif ok = check_gl_version(test_config, flavor); diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c index 9e437553a..bcd47fc55 100644 --- a/tests/util/piglit-util-gl.c +++ b/tests/util/piglit-util-gl.c @@ -714,7 +714,7 @@ int piglit_use_fragment_program(void) "END\n" ; - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); if (!piglit_is_extension_supported("GL_ARB_fragment_program")) return 0; @@ -734,7 +734,7 @@ void piglit_require_fragment_program(void) int piglit_use_vertex_program(void) { - piglit_dispatch_default_init(); + piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); return piglit_is_extension_supported("GL_ARB_vertex_program"); } |