diff options
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_draw_upload.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw_upload.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 38b108751ce..37a65bcb3c9 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -607,11 +607,21 @@ brw_prepare_vertices(struct brw_context *brw) void 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; + } + + /* For non-indirect draws, upload gl_BaseVertex. */ + if (brw->vs.prog_data->uses_vertexid && brw->draw.draw_params_bo == NULL) { + intel_upload_data(brw, gl_basevertex_value, 4, 4, + &brw->draw.draw_params_bo, + &brw->draw.draw_params_offset); } } |