diff options
author | Marek Olšák <[email protected]> | 2014-04-12 17:53:57 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-04-16 14:02:51 +0200 |
commit | 586011486dba1c977d8f9aeb8f95b14e891afcbb (patch) | |
tree | c2cadf9eebeb4563febbe5382e45b472dc038f73 /src/gallium/drivers/r600/r600_pipe.c | |
parent | d4edc607670e37138f7a804ba208cf91acd9d0f1 (diff) |
r600g: merge r600_flush with r600_context_flush
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index ef8883d18a7..983c65a26a6 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -66,38 +66,6 @@ static const struct debug_named_value r600_debug_options[] = { * pipe_context */ -static void r600_flush(struct pipe_context *ctx, unsigned flags, - struct pipe_fence_handle **fence) -{ - struct r600_context *rctx = (struct r600_context *)ctx; - struct pipe_query *render_cond = NULL; - unsigned render_cond_mode = 0; - boolean render_cond_cond = FALSE; - - if (rctx->b.rings.gfx.cs->cdw == rctx->b.initial_gfx_cs_size) - return; - - rctx->b.rings.gfx.flushing = true; - /* Disable render condition. */ - if (rctx->b.current_render_cond) { - render_cond = rctx->b.current_render_cond; - render_cond_cond = rctx->b.current_render_cond_cond; - render_cond_mode = rctx->b.current_render_cond_mode; - ctx->render_condition(ctx, NULL, FALSE, 0); - } - - r600_context_flush(rctx, flags, fence); - rctx->b.rings.gfx.flushing = false; - r600_begin_new_cs(rctx); - - /* Re-enable render condition. */ - if (render_cond) { - ctx->render_condition(ctx, render_cond, render_cond_cond, render_cond_mode); - } - - rctx->b.initial_gfx_cs_size = rctx->b.rings.gfx.cs->cdw; -} - static void r600_flush_from_st(struct pipe_context *ctx, struct pipe_fence_handle **fence, unsigned flags) @@ -114,12 +82,6 @@ static void r600_flush_from_st(struct pipe_context *ctx, rctx->b.rings.gfx.flush(rctx, fflags, fence); } -static void r600_flush_gfx_ring(void *ctx, unsigned flags, - struct pipe_fence_handle **fence) -{ - r600_flush((struct pipe_context*)ctx, flags, fence); -} - static void r600_destroy_context(struct pipe_context *context) { struct r600_context *rctx = (struct r600_context *)context; @@ -233,11 +195,10 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void } rctx->b.rings.gfx.cs = ws->cs_create(ws, RING_GFX, - r600_flush_gfx_ring, rctx, + r600_context_gfx_flush, rctx, rscreen->b.trace_bo ? rscreen->b.trace_bo->cs_buf : NULL); - rctx->b.rings.gfx.flush = r600_flush_gfx_ring; - rctx->b.rings.gfx.flushing = false; + rctx->b.rings.gfx.flush = r600_context_gfx_flush; rctx->allocator_fetch_shader = u_suballocator_create(&rctx->b.b, 64 * 1024, 256, 0, PIPE_USAGE_DEFAULT, FALSE); |