diff options
author | José Fonseca <[email protected]> | 2010-04-24 13:20:39 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-04-24 13:20:39 +0100 |
commit | 39be50dcdebe6bcbb48cb6aa8ac151eee811acb1 (patch) | |
tree | 8eea7003235544c246bd3bbaf7e7f96025457ecd /src/gallium/drivers/llvmpipe/lp_rast.c | |
parent | e7a8cfc8776c70f8c4cc3e158f663f6c630169ed (diff) |
llvmpipe: Move the determination of the number of threads to the screen.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 0a41b6406bd..c3e186b2a06 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -869,20 +869,6 @@ create_rast_threads(struct lp_rasterizer *rast) { unsigned i; -#ifdef PIPE_OS_WINDOWS - /* Multithreading not supported on windows until conditions and barriers are - * properly implemented. */ - rast->num_threads = 0; -#else -#ifdef PIPE_OS_EMBEDDED - rast->num_threads = 0; -#else - rast->num_threads = util_cpu_caps.nr_cpus; -#endif - rast->num_threads = debug_get_num_option("LP_NUM_THREADS", rast->num_threads); - rast->num_threads = MIN2(rast->num_threads, MAX_THREADS); -#endif - /* NOTE: if num_threads is zero, we won't use any threads */ for (i = 0; i < rast->num_threads; i++) { pipe_semaphore_init(&rast->tasks[i].work_ready, 0); @@ -900,7 +886,7 @@ create_rast_threads(struct lp_rasterizer *rast) * processing them. */ struct lp_rasterizer * -lp_rast_create( void ) +lp_rast_create( unsigned num_threads ) { struct lp_rasterizer *rast; unsigned i; @@ -917,6 +903,8 @@ lp_rast_create( void ) task->thread_index = i; } + rast->num_threads = num_threads; + create_rast_threads(rast); /* for synchronizing rasterization threads */ |