summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Girlin <[email protected]>2012-08-28 18:01:13 +0400
committerVadim Girlin <[email protected]>2012-08-28 18:01:13 +0400
commit6463eb013f645440d252b8b390e1c6e3c1212b7e (patch)
treead3de0673eb384145821f0236e225b087e69e57c
parent971750e1cd76dabe22bf2ca83f07266837e3a2a6 (diff)
u_vbuf: avoid unnecessary update of the vertex elements
Signed-off-by: Vadim Girlin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/gallium/auxiliary/util/u_vbuf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c
index 4141ba536fd..52db294cbd4 100644
--- a/src/gallium/auxiliary/util/u_vbuf.c
+++ b/src/gallium/auxiliary/util/u_vbuf.c
@@ -225,7 +225,9 @@ u_vbuf_set_vertex_elements_internal(struct u_vbuf *mgr, unsigned count,
}
assert(ve);
- pipe->bind_vertex_elements_state(pipe, ve->driver_cso);
+
+ if (ve != mgr->ve)
+ pipe->bind_vertex_elements_state(pipe, ve->driver_cso);
return ve;
}