diff options
author | Roland Scheidegger <[email protected]> | 2010-07-13 19:58:58 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-07-13 19:58:58 +0200 |
commit | edac740095fb2514b512034b334947f72648cd51 (patch) | |
tree | 48dc86b5bfd49bfdcc5343755c3f970eb5f6a847 /src/gallium/drivers/llvmpipe/lp_setup.c | |
parent | 962da13ba30d66bd8b9a28ba5f06c66ceec1ce92 (diff) |
llvmpipe: move rasterizer to screen instead of setup context
there's no point of having this per context, so move to screen
(and protect with a mutex).
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index c429f4be0dc..7d48ad8e741 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -152,8 +152,11 @@ static void lp_setup_rasterize_scene( struct lp_setup_context *setup ) { struct lp_scene *scene = lp_setup_get_current_scene(setup); + struct llvmpipe_screen *screen = llvmpipe_screen(scene->pipe->screen); - lp_scene_rasterize(scene, setup->rast); + pipe_mutex_lock(screen->rast_mutex); + lp_scene_rasterize(scene, screen->rast); + pipe_mutex_unlock(screen->rast_mutex); reset_context( setup ); @@ -851,8 +854,6 @@ lp_setup_destroy( struct lp_setup_context *setup ) lp_scene_queue_destroy(setup->empty_scenes); - lp_rast_destroy( setup->rast ); - FREE( setup ); } @@ -879,13 +880,7 @@ lp_setup_create( struct pipe_context *pipe, if (!setup->empty_scenes) goto fail; - /* XXX: move this to the screen and share between contexts: - */ setup->num_threads = screen->num_threads; - setup->rast = lp_rast_create(screen->num_threads); - if (!setup->rast) - goto fail; - setup->vbuf = draw_vbuf_stage(draw, &setup->base); if (!setup->vbuf) goto fail; @@ -909,9 +904,6 @@ lp_setup_create( struct pipe_context *pipe, return setup; fail: - if (setup->rast) - lp_rast_destroy( setup->rast ); - if (setup->vbuf) ; |