summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_test_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_test_main.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_main.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_test_main.c b/src/gallium/drivers/llvmpipe/lp_test_main.c
index d229c620310..4c610923146 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_main.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_main.c
@@ -36,12 +36,13 @@
#include "util/u_cpu_detect.h"
#include "util/u_math.h"
#include "gallivm/lp_bld_const.h"
#include "gallivm/lp_bld_init.h"
+#include "gallivm/lp_bld_debug.h"
#include "lp_test.h"
void
dump_type(FILE *fp,
struct lp_type type)
@@ -366,13 +367,12 @@ int main(int argc, char **argv)
unsigned verbose = 0;
FILE *fp = NULL;
unsigned long n = 1000;
unsigned i;
boolean success;
boolean single = FALSE;
- struct gallivm_state *gallivm;
for(i = 1; i < argc; ++i) {
if(strcmp(argv[i], "-v") == 0)
++verbose;
else if(strcmp(argv[i], "-s") == 0)
single = TRUE;
@@ -381,29 +381,34 @@ int main(int argc, char **argv)
else
n = atoi(argv[i]);
}
lp_build_init();
- gallivm = gallivm_create();
+#ifdef DEBUG
+ if (verbose >= 2) {
+ gallivm_debug |= GALLIVM_DEBUG_IR;
+ gallivm_debug |= GALLIVM_DEBUG_ASM;
+ }
+#endif
util_cpu_detect();
if(fp) {
/* Warm up the caches */
- test_some(gallivm, 0, NULL, 100);
+ test_some(0, NULL, 100);
write_tsv_header(fp);
}
if (single)
- success = test_single(gallivm, verbose, fp);
+ success = test_single(verbose, fp);
else if (n)
- success = test_some(gallivm, verbose, fp, n);
+ success = test_some(verbose, fp, n);
else
- success = test_all(gallivm, verbose, fp);
+ success = test_all(verbose, fp);
if(fp)
fclose(fp);
return success ? 0 : 1;
}