diff options
author | Jerome Glisse <jglisse@redhat.com> | 2010-12-05 19:24:03 -0500 |
---|---|---|
committer | Jerome Glisse <jglisse@redhat.com> | 2010-12-06 15:50:50 -0500 |
commit | afc56b1861c1dae4137493af4c0e6dacc6ee41f9 (patch) | |
tree | 78fa76b483f07d5aecc11be145703533e9e2ecc5 /src/gallium/drivers/r600/r600_pipe.c | |
parent | fa86fc564aea4e40c89f6fc889e6a5bf817634b3 (diff) |
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 <jglisse@redhat.com>
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |