From 6463eb013f645440d252b8b390e1c6e3c1212b7e Mon Sep 17 00:00:00 2001 From: Vadim Girlin Date: Tue, 28 Aug 2012 18:01:13 +0400 Subject: [PATCH] u_vbuf: avoid unnecessary update of the vertex elements MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Vadim Girlin Reviewed-by: Marek Olšák --- src/gallium/auxiliary/util/u_vbuf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.30.2