summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-04-11 22:14:27 +0200
committerMarek Olšák <[email protected]>2014-04-16 14:02:51 +0200
commitdd72c327e967e0df7d5c59d6cde1a431e09e488e (patch)
tree8510c36cf8cb5c24b750706b2534f2c3937595f9 /src/gallium/drivers/r600
parentc6033a6cb8ae50d5513a00ea249f3df20d221b52 (diff)
winsys/radeon: fold cs_set_flush_callback into cs_create
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/r600_pipe.c11
1 files changed, 5 insertions, 6 deletions
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,