From afc56b1861c1dae4137493af4c0e6dacc6ee41f9 Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Sun, 5 Dec 2010 19:24:03 -0500 Subject: r600g: avoid useless shader rebuild at draw call Avoid rebuilding constant shader state at each draw call, factor out spi update that might change at each draw call. Best would be to update spi only when revealent states change (likely only flat shading & sprite point). Signed-off-by: Jerome Glisse --- src/gallium/drivers/r600/r600_pipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 ea57fba8e4..6842571044 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -79,6 +79,8 @@ static void r600_destroy_context(struct pipe_context *context) rctx->context.delete_depth_stencil_alpha_state(&rctx->context, rctx->custom_dsa_flush); + r600_end_vertex_translate(rctx); + r600_context_fini(&rctx->ctx); util_blitter_destroy(rctx->blitter); @@ -90,8 +92,6 @@ static void r600_destroy_context(struct pipe_context *context) u_upload_destroy(rctx->upload_vb); u_upload_destroy(rctx->upload_ib); - r600_end_vertex_translate(rctx); - if (rctx->tran.translate_cache) translate_cache_destroy(rctx->tran.translate_cache); -- cgit v1.2.3