Mesa (master): u_vbuf_mgr: don' t reference non-native vertex buffers as native

Marek Olšák mareko at kemper.freedesktop.org
Tue Nov 22 19:57:10 UTC 2011


Module: Mesa
Branch: master
Commit: 498e86e414dbf9b2f7d2f18cca908217ee644710
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=498e86e414dbf9b2f7d2f18cca908217ee644710

Author: Marek Olšák <maraeo at gmail.com>
Date:   Sun Nov 20 20:34:12 2011 +0100

u_vbuf_mgr: don't reference non-native vertex buffers as native

also don't mark them as 'user', because they will be uploaded through
the translate fallback anyway.

---

 src/gallium/auxiliary/util/u_vbuf_mgr.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.c b/src/gallium/auxiliary/util/u_vbuf_mgr.c
index 179073c..b178f80 100644
--- a/src/gallium/auxiliary/util/u_vbuf_mgr.c
+++ b/src/gallium/auxiliary/util/u_vbuf_mgr.c
@@ -494,7 +494,8 @@ void u_vbuf_set_vertex_buffers(struct u_vbuf_mgr *mgrb,
       mgr->b.real_vertex_buffer[i].stride =
       mgr->b.vertex_buffer[i].stride = vb->stride;
 
-      if (!vb->buffer) {
+      if (!vb->buffer ||
+          mgr->incompatible_vb[i]) {
          pipe_resource_reference(&mgr->b.real_vertex_buffer[i].buffer, NULL);
          continue;
       }




More information about the mesa-commit mailing list