diff options
author | Christian König <[email protected]> | 2010-11-11 21:07:42 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2010-11-11 21:07:42 +0100 |
commit | 195bbe8ce218533569dde1368d04da0fd229913d (patch) | |
tree | 29d3db04673f59dcfd6663c524a5c1343d5cbee6 /src/gallium/tests/graw/gs-test.c | |
parent | 99b57bc20e839043ec6160502814085a0976fccc (diff) | |
parent | d67df5dd9db1cede92f1b177c890f83809bb4582 (diff) |
Merge remote branch 'origin/master' into pipe-video
Diffstat (limited to 'src/gallium/tests/graw/gs-test.c')
-rw-r--r-- | src/gallium/tests/graw/gs-test.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/gallium/tests/graw/gs-test.c b/src/gallium/tests/graw/gs-test.c index 62714900bd9..ef29f134980 100644 --- a/src/gallium/tests/graw/gs-test.c +++ b/src/gallium/tests/graw/gs-test.c @@ -10,7 +10,6 @@ #include "pipe/p_defines.h" #include <stdio.h> /* for fread(), etc */ -#include "util/u_debug.h" /* debug_dump_surface_bmp() */ #include "util/u_inlines.h" #include "util/u_memory.h" /* Offset() */ #include "util/u_draw_quad.h" @@ -343,17 +342,7 @@ static void draw( void ) ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL); -#if 0 - /* At the moment, libgraw leaks out/makes available some of the - * symbols from gallium/auxiliary, including these debug helpers. - * Will eventually want to bless some of these paths, and lock the - * others down so they aren't accessible from test programs. - * - * This currently just happens to work on debug builds - a release - * build will probably fail to link here: - */ - debug_dump_surface_bmp(ctx, "result.bmp", surf); -#endif + graw_save_surface_to_file(ctx, surf, NULL); screen->flush_frontbuffer(screen, surf, window); } @@ -591,19 +580,25 @@ static void args(int argc, char *argv[]) { int i; - for (i = 1; i < argc; i++) { + for (i = 1; i < argc;) { + if (graw_parse_args(&i, argc, argv)) { + continue; + } if (strcmp(argv[i], "-fps") == 0) { show_fps = 1; + i++; } else if (strcmp(argv[i], "-strip") == 0) { draw_strip = 1; + i++; } else if (i == argc - 1) { - filename = argv[i]; + filename = argv[i]; + i++; } else { - usage(argv[0]); - exit(1); + usage(argv[0]); + exit(1); } } |