winsys/radeon: fold cs_set_flush_callback into cs_create

Reviewed-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
Marek Olšák
2014-04-11 22:14:27 +02:00
parent c6033a6cb8
commit dd72c327e9
8 changed files with 26 additions and 42 deletions

View File

@@ -122,6 +122,7 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, void *
{
struct si_context *sctx = CALLOC_STRUCT(si_context);
struct si_screen* sscreen = (struct si_screen *)screen;
struct radeon_winsys *ws = sscreen->b.ws;
int shader, i;
if (sctx == NULL)
@@ -147,9 +148,9 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, void *
sctx->b.b.create_video_buffer = vl_video_buffer_create;
}
sctx->b.rings.gfx.cs = sctx->b.ws->cs_create(sctx->b.ws, RING_GFX, NULL);
sctx->b.rings.gfx.cs = ws->cs_create(ws, RING_GFX, si_flush_gfx_ring,
sctx, NULL);
sctx->b.rings.gfx.flush = si_flush_gfx_ring;
sctx->b.ws->cs_set_flush_callback(sctx->b.rings.gfx.cs, si_flush_gfx_ring, sctx);
si_init_all_descriptors(sctx);