From e68c83a5a01a8a659857310cfcc785c7e028d3f0 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 21 Oct 2010 17:34:25 +1000 Subject: r600g: initial translate state support --- src/gallium/drivers/r600/r600_pipe.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/gallium/drivers/r600/r600_pipe.c') diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index dd8fa4fcd7..bea7ef5df8 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -85,6 +85,9 @@ static void r600_destroy_context(struct pipe_context *context) u_upload_destroy(rctx->upload_vb); u_upload_destroy(rctx->upload_ib); + if (rctx->tran.translate_cache) + translate_cache_destroy(rctx->tran.translate_cache); + FREE(rctx->ps_resource); FREE(rctx->vs_resource); FREE(rctx); @@ -173,6 +176,12 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void return NULL; } + rctx->tran.translate_cache = translate_cache_create(); + if (rctx->tran.translate_cache == NULL) { + FREE(rctx); + return NULL; + } + rctx->vs_resource = CALLOC(R600_RESOURCE_ARRAY_SIZE, sizeof(struct r600_pipe_state)); if (!rctx->vs_resource) { FREE(rctx); -- cgit v1.2.3