summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver McFadden <z3ro.geek@gmail.com>2007-09-30 11:56:40 +0000
committerOliver McFadden <z3ro.geek@gmail.com>2007-09-30 11:56:40 +0000
commit1bc48fe03976ee8d1f976a0ba95149583b51d64c (patch)
tree30d35aa91a9664f3fcc6e686468dcae0044f9e1c
parent239a12d3967bb9daef9732dfe7cdd2b1b2ca0a53 (diff)
Added a fast dumping option for quick debug tests. You should NOT use this!
-rw-r--r--src/main.c7
-rw-r--r--src/main.h2
-rw-r--r--src/test.c6
3 files changed, 12 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index e38e7c9..1adc47c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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;
diff --git a/src/main.h b/src/main.h
index bedbf83..2aefe4e 100644
--- a/src/main.h
+++ b/src/main.h
@@ -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;
diff --git a/src/test.c b/src/test.c
index 9c7dd3b..85638c8 100644
--- a/src/test.c
+++ b/src/test.c
@@ -85,7 +85,11 @@ test_quiescent (void)
struct timespec req = { 1, 0 };
glFinish ();
- nanosleep (&req, NULL);
+
+ if (!option_fast)
+ {
+ nanosleep (&req, NULL);
+ }
}
void