diff options
Diffstat (limited to 'src/gallium/drivers/r600/r600_context.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_context.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_context.c b/src/gallium/drivers/r600/r600_context.c index 091751e93a..cff15c57d2 100644 --- a/src/gallium/drivers/r600/r600_context.c +++ b/src/gallium/drivers/r600/r600_context.c @@ -62,6 +62,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); + radeon_ctx_fini(rctx->ctx); FREE(rctx); } @@ -153,6 +156,10 @@ struct pipe_context *r600_create_context(struct pipe_screen *screen, void *priv) goto out_free; } + rctx->tran.translate_cache = translate_cache_create(); + if (rctx->tran.translate_cache == NULL) + goto out_free; + rctx->vs_constant = (struct radeon_state *)calloc(R600_MAX_CONSTANT, sizeof(struct radeon_state)); if (!rctx->vs_constant) { goto out_free; |