diff options
author | José Fonseca <[email protected]> | 2009-12-08 08:02:49 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-12-08 08:02:49 +0000 |
commit | 7f457acabcbeea6a27b4f375f55e318fff52445f (patch) | |
tree | 6824c01f296a9d95974f98f3781052ca55eddf82 /src/gallium/drivers/llvmpipe | |
parent | 73e13c33fd0a9b8574d00d01d301b9d4f88d4051 (diff) |
llvmpipe: Use number of CPUs as default number of threads.
Also bump MAX_THREADS to 8.
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast_priv.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 01685b79d85..7cd046cc390 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -27,6 +27,7 @@ #include "util/u_memory.h" #include "util/u_math.h" +#include "util/u_cpu_detect.h" #include "lp_debug.h" #include "lp_state.h" @@ -639,7 +640,8 @@ create_rast_threads(struct lp_rasterizer *rast) { unsigned i; - rast->num_threads = debug_get_num_option("LP_NUM_THREADS", MAX_THREADS); + rast->num_threads = util_cpu_caps.nr_cpus; + rast->num_threads = debug_get_num_option("LP_NUM_THREADS", rast->num_threads); rast->num_threads = MIN2(rast->num_threads, MAX_THREADS); /* NOTE: if num_threads is zero, we won't use any threads */ diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h index 62f3c877da5..5502419a928 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h +++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h @@ -32,7 +32,7 @@ #include "lp_rast.h" -#define MAX_THREADS 4 /* XXX probably temporary here */ +#define MAX_THREADS 8 /* XXX probably temporary here */ struct pipe_transfer; |