unsigned prim = translate_prim(ctx, prims[i].mode);
if (u_trim_pipe_prim(prims[i].mode, &vcount)) {
- pipe->draw_range_elements(pipe, indexBuf, indexSize, 0,
+ pipe->draw_range_elements(pipe, indexBuf, indexSize,
+ prims[i].basevertex,
min_index, max_index, prim,
prims[i].start + indexOffset, vcount);
}
if (prims[i].num_instances == 1) {
pipe->draw_elements(pipe, indexBuf,
indexSize,
- 0, /* indexBias */
+ prims[i].basevertex,
prim,
prims[i].start + indexOffset,
vcount);
else {
pipe->draw_elements_instanced(pipe, indexBuf,
indexSize,
- 0, /* indexBias */
+ prims[i].basevertex,
prim,
prims[i].start + indexOffset,
vcount,
* Extensions that are supported by all Gallium drivers:
*/
ctx->Extensions.ARB_copy_buffer = GL_TRUE;
+ ctx->Extensions.ARB_draw_elements_base_vertex = GL_TRUE;
ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE;
ctx->Extensions.ARB_fragment_program = GL_TRUE;
ctx->Extensions.ARB_map_buffer_range = GL_TRUE;