diff options
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index e27d78a3432..6cdaa51b62d 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -47,6 +47,7 @@ #include "gallivm/lp_bld_format.h" #include "gallivm/lp_bld_debug.h" #include "lp_scene.h" +#include "lp_screen.h" #include "lp_tex_sample.h" @@ -1128,6 +1129,10 @@ lp_rast_queue_scene( struct lp_rasterizer *rast, { LP_DBG(DEBUG_SETUP, "%s\n", __FUNCTION__); + lp_fence_reference(&rast->last_fence, scene->fence); + if (rast->last_fence) + rast->last_fence->issued = TRUE; + if (rast->num_threads == 0) { /* no threading */ unsigned fpstate = util_fpstate_get(); @@ -1384,6 +1389,8 @@ void lp_rast_destroy( struct lp_rasterizer *rast ) align_free(rast->tasks[i].thread_data.cache); } + lp_fence_reference(&rast->last_fence, NULL); + /* for synchronizing rasterization threads */ if (rast->num_threads > 0) { util_barrier_destroy( &rast->barrier ); @@ -1394,4 +1401,9 @@ void lp_rast_destroy( struct lp_rasterizer *rast ) FREE(rast); } - +void lp_rast_fence(struct lp_rasterizer *rast, + struct lp_fence **fence) +{ + if (fence) + lp_fence_reference((struct lp_fence **)fence, rast->last_fence); +} |