u_vbuf: fix vb slot assignment for translated buffers
authorNicolai Hähnle <nhaehnle@gmail.com>
Sat, 3 Oct 2015 22:44:00 +0000 (00:44 +0200)
committerNicolai Hähnle <nhaehnle@gmail.com>
Mon, 12 Oct 2015 14:46:30 +0000 (16:46 +0200)
Vertex attributes of different categories (constant/per-instance/
per-vertex) go into different buffers for translation, and this is now
properly reflected in the vertex buffers passed to the driver.

Fixes e.g. piglit's point-vertex-id divisor test.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/util/u_vbuf.c

index 3d2193c3bf5551fec53d97fb6070314b65260d7d..b31ada138b8132010a4acd3f010cbd23c5f9fdcc 100644 (file)
@@ -544,6 +544,7 @@ u_vbuf_translate_find_free_vb_slots(struct u_vbuf *mgr,
 
          index = ffs(unused_vb_mask) - 1;
          fallback_vbs[type] = index;
+         unused_vb_mask &= ~(1 << index);
          /*printf("found slot=%i for type=%i\n", index, type);*/
       }
    }