u_vbuf_mgr: don't reference non-native vertex buffers as native
authorMarek Olšák <maraeo@gmail.com>
Sun, 20 Nov 2011 19:34:12 +0000 (20:34 +0100)
committerMarek Olšák <maraeo@gmail.com>
Tue, 22 Nov 2011 19:56:51 +0000 (20:56 +0100)
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

index 179073c6145e9be491cf3bd3d1e476630e9cef85..b178f809de51de0bdfd3f1f6ec884d1000145c54 100644 (file)
@@ -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;
       }