summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_pipe.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-10-21 17:34:25 +1000
committerDave Airlie <airlied@redhat.com>2010-10-21 19:58:08 +1000
commite68c83a5a01a8a659857310cfcc785c7e028d3f0 (patch)
tree64da11e79b76d5e36d09493017470bee23766f80 /src/gallium/drivers/r600/r600_pipe.c
parent3a54195679b5a9ed12127c85ca03e5546643d63d (diff)
r600g: initial translate state support
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.c')
-rw-r--r--src/gallium/drivers/r600/r600_pipe.c9
1 files changed, 9 insertions, 0 deletions
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);