Mesa (master): xdemos/glsync: handle no sync method better
Jesse Barnes
jbarnes at kemper.freedesktop.org
Mon Jan 11 20:24:17 UTC 2010
Module: Mesa
Branch: master
Commit: c642f3941ba2ab68135037e1fcb1c29dcb820de7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c642f3941ba2ab68135037e1fcb1c29dcb820de7
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date: Mon Jan 4 16:26:17 2010 -0500
xdemos/glsync: handle no sync method better
Print out count, finish rendering, etc. Makes the -sn option more useful.
---
progs/xdemos/glsync.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/progs/xdemos/glsync.c b/progs/xdemos/glsync.c
index 6108d99..4dc4937 100644
--- a/progs/xdemos/glsync.c
+++ b/progs/xdemos/glsync.c
@@ -117,8 +117,7 @@ int main(int argc, char *argv[])
int dummy;
Atom wmDelete;
enum sync_type waitforsync = none;
- int width = 500, height = 500, verbose = 0,
- countonly = 0, interval = 1;
+ int width = 500, height = 500, verbose = 0, interval = 1;
int c, i = 1;
int ret;
int attribs[] = { GLX_RGBA,
@@ -283,13 +282,10 @@ int main(int argc, char *argv[])
glFlush();
} else if (waitforsync == buffer_swap) {
glXSwapBuffers(disp, winGL);
- }
-
- if (countonly) {
- video_sync(2, 1, &count);
- fprintf(stderr, "current count: %d\n", count);
+ } else {
+ video_sync_get(&count);
sleep(1);
- continue;
+ glFinish();
}
if (verbose) {
More information about the mesa-commit
mailing list