diff options
author | Oliver McFadden <z3ro.geek@gmail.com> | 2007-09-30 11:56:40 +0000 |
---|---|---|
committer | Oliver McFadden <z3ro.geek@gmail.com> | 2007-09-30 11:56:40 +0000 |
commit | 1bc48fe03976ee8d1f976a0ba95149583b51d64c (patch) | |
tree | 30d35aa91a9664f3fcc6e686468dcae0044f9e1c | |
parent | 239a12d3967bb9daef9732dfe7cdd2b1b2ca0a53 (diff) |
Added a fast dumping option for quick debug tests. You should NOT use this!
-rw-r--r-- | src/main.c | 7 | ||||
-rw-r--r-- | src/main.h | 2 | ||||
-rw-r--r-- | src/test.c | 6 |
3 files changed, 12 insertions, 3 deletions
@@ -40,6 +40,7 @@ int option_debug = 0; int option_disable_ib = 0; +int option_fast = 0; int option_interface = IF_AGP; int option_verbose = 0; @@ -97,6 +98,7 @@ static struct option long_options[] = { {"brief", no_argument, &option_verbose, 0}, {"debug", no_argument, &option_debug, 1}, {"disable-ib", no_argument, &option_disable_ib, 1}, + {"fast", no_argument, &option_fast, 1}, {"igp", no_argument, &option_interface, IF_IGP}, {"output", required_argument, 0, 'o'}, {"pci-e", no_argument, &option_interface, IF_PCIE}, @@ -121,7 +123,7 @@ main (int argc, char **argv) srand (time (NULL)); revenge_rand = rand () & 0xffff; - while ((opt = getopt_long (argc, argv, "bdiv", long_options, &i)) != -1) + while ((opt = getopt_long (argc, argv, "bdfiv", long_options, &i)) != -1) { switch (opt) { @@ -131,6 +133,9 @@ main (int argc, char **argv) case 'd': option_debug = 1; break; + case 'f': + option_fast = 1; + break; case 'i': option_disable_ib = 1; break; @@ -128,9 +128,9 @@ # define R300_TXO_OFFSET_SHIFT 5 /* END */ -extern char *option_output; extern int option_debug; extern int option_disable_ib; +extern int option_fast; extern int option_interface; extern int option_verbose; extern int mem_fd; @@ -85,7 +85,11 @@ test_quiescent (void) struct timespec req = { 1, 0 }; glFinish (); - nanosleep (&req, NULL); + + if (!option_fast) + { + nanosleep (&req, NULL); + } } void |