The drivers will need this for passing in gl_DrawIDARB. For indirect
multidraw calls, we get the prim array and prim[i].draw_id == i and is
redundant. But for non-indirect calls, we get one primitive at a time
and need the draw_id field.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
GLint basevertex;
GLuint num_instances;
GLuint base_instance;
+ GLuint draw_id;
GLsizeiptr indirect_offset;
};
prim[i].indexed = 1;
prim[i].num_instances = 1;
prim[i].base_instance = 0;
+ prim[i].draw_id = i;
prim[i].is_indirect = 0;
if (basevertex != NULL)
prim[i].basevertex = basevertex[i];
prim[0].indexed = 1;
prim[0].num_instances = 1;
prim[0].base_instance = 0;
+ prim[0].draw_id = i;
prim[0].is_indirect = 0;
if (basevertex != NULL)
prim[0].basevertex = basevertex[i];
prim[i].mode = mode;
prim[i].indirect_offset = offset;
prim[i].is_indirect = 1;
+ prim[i].draw_id = i;
}
check_buffers_are_unmapped(exec->array.inputs);
prim[i].indexed = 1;
prim[i].indirect_offset = offset;
prim[i].is_indirect = 1;
+ prim[i].draw_id = i;
}
check_buffers_are_unmapped(exec->array.inputs);