struct gl_buffer_object *indirect)
{
GLuint prim_num;
+ struct _mesa_prim new_prim;
+ struct _mesa_index_buffer new_ib;
struct sub_primitive *sub_prims;
struct sub_primitive *sub_prim;
GLuint num_sub_prims;
/* If there is an indirect buffer, map it and extract the draw params */
if (indirect && prims[0].is_indirect) {
- struct _mesa_prim new_prim = *prims;
- struct _mesa_index_buffer new_ib = *ib;
const uint32_t *indirect_params;
if (!ctx->Driver.MapBufferRange(ctx, 0, indirect->Size, GL_MAP_READ_BIT,
indirect, MAP_INTERNAL)) {
}
assert(nr_prims == 1);
+ new_prim = prims[0];
indirect_params = (const uint32_t *)
ADD_POINTERS(indirect->Mappings[MAP_INTERNAL].Pointer,
new_prim.indirect_offset);
new_prim.basevertex = indirect_params[3];
new_prim.base_instance = indirect_params[4];
+ new_ib = *ib;
new_ib.count = new_prim.count;
prims = &new_prim;