diff options
author | Jamey Sharp <jamey@minilop.net> | 2014-04-23 15:03:05 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2014-10-10 17:27:52 +0200 |
commit | c5fdde638e525ba08205dab63d98684c5740a8e6 (patch) | |
tree | 0bf88333f379ac144eb554143103eda26804666f | |
parent | f6f2b9f1526b7d17ac87d20600549a9262d81019 (diff) | |
download | piglit-c5fdde638e525ba08205dab63d98684c5740a8e6.tar.gz |
Allow OML_sync_control tests to run fullscreen.
None of the current tests use this, but we introduce some fullscreen
tests in the next commit.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Theo Hill <Theo0x48@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | tests/spec/glx_oml_sync_control/common.c | 7 | ||||
-rw-r--r-- | tests/spec/glx_oml_sync_control/common.h | 2 | ||||
-rw-r--r-- | tests/spec/glx_oml_sync_control/getmscrate.c | 2 | ||||
-rw-r--r-- | tests/spec/glx_oml_sync_control/swapbuffersmsc-divisor-zero.c | 2 | ||||
-rw-r--r-- | tests/spec/glx_oml_sync_control/swapbuffersmsc-return.c | 2 | ||||
-rw-r--r-- | tests/spec/glx_oml_sync_control/waitformsc.c | 2 |
6 files changed, 10 insertions, 7 deletions
diff --git a/tests/spec/glx_oml_sync_control/common.c b/tests/spec/glx_oml_sync_control/common.c index 2b2f5a10e..6873ef152 100644 --- a/tests/spec/glx_oml_sync_control/common.c +++ b/tests/spec/glx_oml_sync_control/common.c @@ -53,7 +53,7 @@ Window win; XVisualInfo *visinfo; void -piglit_oml_sync_control_test_run(enum piglit_result (*draw)(Display *dpy)) +piglit_oml_sync_control_test_run(bool fullscreen, enum piglit_result (*draw)(Display *dpy)) { Display *dpy; GLXContext ctx; @@ -68,7 +68,10 @@ piglit_oml_sync_control_test_run(enum piglit_result (*draw)(Display *dpy)) piglit_glx_get_all_proc_addresses(procs, ARRAY_SIZE(procs)); visinfo = piglit_get_glx_visual(dpy); - win = piglit_get_glx_window(dpy, visinfo); + if (fullscreen) + win = piglit_get_glx_window_fullscreen(dpy, visinfo); + else + win = piglit_get_glx_window(dpy, visinfo); ctx = piglit_get_glx_context(dpy, visinfo); glXMakeCurrent(dpy, win, ctx); diff --git a/tests/spec/glx_oml_sync_control/common.h b/tests/spec/glx_oml_sync_control/common.h index 40ef4a3e9..3a6a08be4 100644 --- a/tests/spec/glx_oml_sync_control/common.h +++ b/tests/spec/glx_oml_sync_control/common.h @@ -13,4 +13,4 @@ extern PFNGLXWAITFORSBCOMLPROC __piglit_glXWaitForSbcOML; extern Window win; extern XVisualInfo *visinfo; -void piglit_oml_sync_control_test_run(enum piglit_result (*draw)(Display *dpy)); +void piglit_oml_sync_control_test_run(bool fullscreen, enum piglit_result (*draw)(Display *dpy)); diff --git a/tests/spec/glx_oml_sync_control/getmscrate.c b/tests/spec/glx_oml_sync_control/getmscrate.c index 666cee86e..1cbc5e224 100644 --- a/tests/spec/glx_oml_sync_control/getmscrate.c +++ b/tests/spec/glx_oml_sync_control/getmscrate.c @@ -82,7 +82,7 @@ draw(Display *dpy) int main(int argc, char **argv) { - piglit_oml_sync_control_test_run(draw); + piglit_oml_sync_control_test_run(false, draw); return 0; } diff --git a/tests/spec/glx_oml_sync_control/swapbuffersmsc-divisor-zero.c b/tests/spec/glx_oml_sync_control/swapbuffersmsc-divisor-zero.c index 9be7999eb..6889f7ab8 100644 --- a/tests/spec/glx_oml_sync_control/swapbuffersmsc-divisor-zero.c +++ b/tests/spec/glx_oml_sync_control/swapbuffersmsc-divisor-zero.c @@ -137,7 +137,7 @@ wrap: int main(int argc, char **argv) { - piglit_oml_sync_control_test_run(draw); + piglit_oml_sync_control_test_run(false, draw); return 0; } diff --git a/tests/spec/glx_oml_sync_control/swapbuffersmsc-return.c b/tests/spec/glx_oml_sync_control/swapbuffersmsc-return.c index 6041a1061..c5bbaea42 100644 --- a/tests/spec/glx_oml_sync_control/swapbuffersmsc-return.c +++ b/tests/spec/glx_oml_sync_control/swapbuffersmsc-return.c @@ -113,7 +113,7 @@ main(int argc, char **argv) swap_interval = atoi(argv[1]); } - piglit_oml_sync_control_test_run(draw); + piglit_oml_sync_control_test_run(false, draw); return 0; } diff --git a/tests/spec/glx_oml_sync_control/waitformsc.c b/tests/spec/glx_oml_sync_control/waitformsc.c index ee7c9cb70..3d08dbcc0 100644 --- a/tests/spec/glx_oml_sync_control/waitformsc.c +++ b/tests/spec/glx_oml_sync_control/waitformsc.c @@ -96,7 +96,7 @@ wrap: int main(int argc, char **argv) { - piglit_oml_sync_control_test_run(draw); + piglit_oml_sync_control_test_run(false, draw); return 0; } |