summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2016-02-10 16:42:19 -0800
committerVinson Lee <[email protected]>2016-02-13 14:42:05 -0800
commit4ed4c1d9210b11ce6faea81455c21531904ea45b (patch)
tree40420b3106b7985cf3e637c6558d82e8fac6aba0 /src/gallium
parent9e30d66b7c9e7428ad15b6274694a7a1ceee68ae (diff)
llvmpipe: Do not use barriers if not using threads.
Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94088 Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index d22e50777fa..9e56c962d2d 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -910,7 +910,9 @@ lp_rast_create( unsigned num_threads )
create_rast_threads(rast);
/* for synchronizing rasterization threads */
- pipe_barrier_init( &rast->barrier, rast->num_threads );
+ if (rast->num_threads > 0) {
+ pipe_barrier_init( &rast->barrier, rast->num_threads );
+ }
memset(lp_dummy_tile, 0, sizeof lp_dummy_tile);
@@ -967,7 +969,9 @@ void lp_rast_destroy( struct lp_rasterizer *rast )
}
/* for synchronizing rasterization threads */
- pipe_barrier_destroy( &rast->barrier );
+ if (rast->num_threads > 0) {
+ pipe_barrier_destroy( &rast->barrier );
+ }
lp_scene_queue_destroy(rast->full_scenes);