summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2010-11-23 08:39:30 +0100
committerTilman Sauerbeck <[email protected]>2010-11-23 08:39:43 +0100
commit07e0424a172970a6ea06e09fe92c1681d8f0f260 (patch)
treec3256f6de3b7ec481eb8f58f483c03ce31c9368a /src/gallium/drivers
parentf44d96e1af7a3a88677fa256d3fbb96834ffaf39 (diff)
r600g: Only compare active vertex elements
Signed-off-by: Tilman Sauerbeck <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r600/r600_shader.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 3e42309bde0..37884d0f5b2 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -274,7 +274,8 @@ static int r600_shader_update(struct pipe_context *ctx, struct r600_pipe_shader
return 0;
/* doing a full memcmp fell over the refcount */
if ((rshader->vertex_elements.count == rctx->vertex_elements->count) &&
- (!memcmp(&rshader->vertex_elements.elements, &rctx->vertex_elements->elements, 32 * sizeof(struct pipe_vertex_element)))) {
+ (!memcmp(&rshader->vertex_elements.elements, &rctx->vertex_elements->elements,
+ rctx->vertex_elements->count * sizeof(struct pipe_vertex_element)))) {
return 0;
}
rshader->vertex_elements = *rctx->vertex_elements;