freedreno/a4xx: handle index_bias (i.e. base_vertex)
authorRob Clark <robclark@freedesktop.org>
Tue, 24 Feb 2015 17:29:06 +0000 (12:29 -0500)
committerRob Clark <robclark@freedesktop.org>
Tue, 24 Feb 2015 19:23:38 +0000 (14:23 -0500)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a4xx/fd4_draw.c

index 29dc2ed002ec0932eb9c66c5e03184d35644b152..b6bf650cfe040c195f4d10d49bff9049a90ee6be 100644 (file)
@@ -54,7 +54,7 @@ draw_impl(struct fd_context *ctx, struct fd_ringbuffer *ring,
                fd4_emit_vertex_bufs(ring, emit);
 
        OUT_PKT0(ring, REG_A4XX_VFD_INDEX_OFFSET, 2);
-       OUT_RING(ring, info->start);            /* VFD_INDEX_OFFSET */
+       OUT_RING(ring, info->indexed ? info->index_bias : info->start); /* VFD_INDEX_OFFSET */
        OUT_RING(ring, info->start_instance);   /* ??? UNKNOWN_2209 */
 
        OUT_PKT0(ring, REG_A4XX_PC_RESTART_INDEX, 1);