[Piglit] [PATCH 6/9] Allow OML_sync_control tests to run fullscreen.

Jamey Sharp jamey at minilop.net
Wed Apr 23 17:27:20 PDT 2014


None of the current tests use this, but we introduce some fullscreen
tests in the next commit.

Signed-off-by: Jamey Sharp <jamey at minilop.net>
Signed-off-by: Theo Hill <Theo0x48 at gmail.com>
---
 tests/spec/glx_oml_sync_control/common.c                      | 7 +++++--
 tests/spec/glx_oml_sync_control/common.h                      | 2 +-
 tests/spec/glx_oml_sync_control/getmscrate.c                  | 2 +-
 tests/spec/glx_oml_sync_control/swapbuffersmsc-divisor-zero.c | 2 +-
 tests/spec/glx_oml_sync_control/swapbuffersmsc-return.c       | 2 +-
 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 b83e886..320c5d0 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 40ef4a3..3a6a08b 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 c18ea49..bfb0cda 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 555f551..d83905c 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 2f31fbf..a37fc9a 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 6fdef6e..501ba42 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;
 }
-- 
1.8.5.3



More information about the Piglit mailing list