diff options
author | Jerome Glisse <[email protected]> | 2010-12-05 19:24:03 -0500 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2010-12-06 15:50:50 -0500 |
commit | afc56b1861c1dae4137493af4c0e6dacc6ee41f9 (patch) | |
tree | 78fa76b483f07d5aecc11be145703533e9e2ecc5 /src/gallium/drivers/r600/r600_translate.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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_translate.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_translate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_translate.c b/src/gallium/drivers/r600/r600_translate.c index d927f53398d..1c227d32151 100644 --- a/src/gallium/drivers/r600/r600_translate.c +++ b/src/gallium/drivers/r600/r600_translate.c @@ -169,6 +169,9 @@ void r600_end_vertex_translate(struct r600_pipe_context *rctx) { struct pipe_context *pipe = &rctx->context; + if (rctx->tran.new_velems == NULL) { + return; + } /* Restore vertex elements. */ if (rctx->vertex_elements == rctx->tran.new_velems) { pipe->bind_vertex_elements_state(pipe, NULL); |