diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index c581cc0..f3d1336 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -186,10 +186,13 @@ static void brw_emit_prim(struct brw_context *brw, vertex_access_type = brw->gen >= 7 ? GEN7_3DPRIM_VERTEXBUFFER_ACCESS_RANDOM : GEN4_3DPRIM_VERTEXBUFFER_ACCESS_RANDOM; + brw->draw.start_vertex_location += brw->ib.start_vertex_offset; + brw->draw.base_vertex_location += brw->vb.start_vertex_bias; } else { vertex_access_type = brw->gen >= 7 ? GEN7_3DPRIM_VERTEXBUFFER_ACCESS_SEQUENTIAL : GEN4_3DPRIM_VERTEXBUFFER_ACCESS_SEQUENTIAL; + brw->draw.start_vertex_location += brw->vb.start_vertex_bias; } /* We only need to trim the primitive count on pre-Gen6. */ diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 6e0cf3e..3765582 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -606,11 +606,8 @@ brw_prepare_shader_draw_parameters(struct brw_context *brw) { int *gl_basevertex_value; if (brw->draw.indexed) { - brw->draw.start_vertex_location += brw->ib.start_vertex_offset; - brw->draw.base_vertex_location += brw->vb.start_vertex_bias; gl_basevertex_value = &brw->draw.base_vertex_location; } else { - brw->draw.start_vertex_location += brw->vb.start_vertex_bias; gl_basevertex_value = &brw->draw.start_vertex_location; }