From dd72c327e967e0df7d5c59d6cde1a431e09e488e Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 11 Apr 2014 22:14:27 +0200 Subject: winsys/radeon: fold cs_set_flush_callback into cs_create MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Christian König --- src/gallium/drivers/r600/r600_pipe.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/gallium/drivers/r600') diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 6b2fcaf9bb4..677f414226d 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -167,6 +167,7 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void { struct r600_context *rctx = CALLOC_STRUCT(r600_context); struct r600_screen* rscreen = (struct r600_screen *)screen; + struct radeon_winsys *ws = rscreen->b.ws; if (rctx == NULL) return NULL; @@ -231,13 +232,11 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void goto fail; } - if (rscreen->b.trace_bo) { - rctx->b.rings.gfx.cs = rctx->b.ws->cs_create(rctx->b.ws, RING_GFX, rscreen->b.trace_bo->cs_buf); - } else { - rctx->b.rings.gfx.cs = rctx->b.ws->cs_create(rctx->b.ws, RING_GFX, NULL); - } + rctx->b.rings.gfx.cs = ws->cs_create(ws, RING_GFX, + r600_flush_gfx_ring, rctx, + rscreen->b.trace_bo ? + rscreen->b.trace_bo->cs_buf : NULL); rctx->b.rings.gfx.flush = r600_flush_gfx_ring; - rctx->b.ws->cs_set_flush_callback(rctx->b.rings.gfx.cs, r600_flush_gfx_ring, rctx); rctx->b.rings.gfx.flushing = false; rctx->allocator_fetch_shader = u_suballocator_create(&rctx->b.b, 64 * 1024, 256, -- cgit v1.2.3