Mesa (master): u_vbuf: avoid unnecessary update of the vertex elements
Vadim Girlin
vadimg at kemper.freedesktop.org
Tue Aug 28 14:03:43 UTC 2012
Module: Mesa
Branch: master
Commit: 6463eb013f645440d252b8b390e1c6e3c1212b7e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6463eb013f645440d252b8b390e1c6e3c1212b7e
Author: Vadim Girlin <vadimgirlin at gmail.com>
Date: Tue Aug 28 18:01:13 2012 +0400
u_vbuf: avoid unnecessary update of the vertex elements
Signed-off-by: Vadim Girlin <vadimgirlin at gmail.com>
Reviewed-by: Marek Olšák <maraeo at gmail.com>
---
src/gallium/auxiliary/util/u_vbuf.c | 4 +++-
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 4141ba5..52db294 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;
}
More information about the mesa-commit
mailing list