summaryrefslogtreecommitdiff
path: root/tests/glx
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-05-10 17:30:55 -0700
committerEric Anholt <eric@anholt.net>2013-06-17 14:31:18 -0700
commitb677a1042b7cbc4e5be01c7a9ff78fdc1b3dba0e (patch)
treee921927a13bc3454da45e0b8115f33fa39f7e0b0 /tests/glx
parentb60dd3a48d0d746d99e802aacb231b3a45aa6807 (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>
Diffstat (limited to 'tests/glx')
-rw-r--r--tests/glx/glx-copy-sub-buffer.c2
-rw-r--r--tests/glx/glx-destroycontext-1.c2
-rw-r--r--tests/glx/glx-destroycontext-2.c2
-rw-r--r--tests/glx/glx-fbo-binding.c2
-rw-r--r--tests/glx/glx-make-current.c2
-rw-r--r--tests/glx/glx-make-glxdrawable-current.c2
-rw-r--r--tests/glx/glx-multi-context-ib-1.c2
-rw-r--r--tests/glx/glx-multithread-makecurrent-1.c2
-rw-r--r--tests/glx/glx-multithread-makecurrent-2.c2
-rw-r--r--tests/glx/glx-multithread-makecurrent-3.c2
-rw-r--r--tests/glx/glx-multithread-makecurrent-4.c2
-rw-r--r--tests/glx/glx-multithread-shader-compile.c2
-rw-r--r--tests/glx/glx-multithread.c2
-rw-r--r--tests/glx/glx-shader-sharing.c2
-rw-r--r--tests/glx/glx-swap-event.c2
-rw-r--r--tests/glx/glx-swap-pixmap-bad.c2
-rw-r--r--tests/glx/glx-swap-pixmap.c2
-rw-r--r--tests/glx/glx-swap-singlebuffer.c2
-rw-r--r--tests/glx/glx-tfp.c2
-rw-r--r--tests/glx/glx-visuals-depth.c2
-rw-r--r--tests/glx/glx-visuals-stencil.c2
21 files changed, 21 insertions, 21 deletions
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);