From: Vadim Girlin Date: Tue, 28 Aug 2012 14:01:13 +0000 (+0400) Subject: u_vbuf: avoid unnecessary update of the vertex elements X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6463eb013f645440d252b8b390e1c6e3c1212b7e;p=mesa.git u_vbuf: avoid unnecessary update of the vertex elements Signed-off-by: Vadim Girlin Reviewed-by: Marek Olšák --- 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; }