diff options
author | Jerome Glisse <[email protected]> | 2010-09-28 14:34:25 -0400 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2010-09-28 14:34:25 -0400 |
commit | 723a655ed3f3092f6fa74a903fb774a3cec93b79 (patch) | |
tree | a74876c5288161b03a62c873c4f8984c24530d43 /src/gallium/drivers/r600/r600_state2.c | |
parent | fe790a3c346b5edb8b64cfc937b0d5cd9e337412 (diff) |
r600g: avoid rebuilding the vertex shader if no change to input format
Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_state2.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_state2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_state2.c b/src/gallium/drivers/r600/r600_state2.c index 72d04534e62..796442f5a4b 100644 --- a/src/gallium/drivers/r600/r600_state2.c +++ b/src/gallium/drivers/r600/r600_state2.c @@ -257,6 +257,10 @@ static int r600_shader_update(struct pipe_context *ctx, struct r600_pipe_shader if (shader->processor_type != TGSI_PROCESSOR_VERTEX) return 0; + if (!memcmp(&rshader->vertex_elements, rctx->vertex_elements, sizeof(struct r600_vertex_element))) { + return 0; + } + rshader->vertex_elements = *rctx->vertex_elements; for (i = 0; i < rctx->vertex_elements->count; i++) { resource_format[nresources++] = rctx->vertex_elements->elements[i].src_format; } |