/**
* Same as DrawGallium, but mode can also change between draws.
*
- * If mode != NULL, mode changes for each draw.
- * At least one of them must be non-NULL.
- *
* "info" is not const and the following fields can be changed by
* the callee in addition to the fields listed by DrawGallium:
- * - info->mode (if mode != NULL)
+ * - info->mode
*
* This function exists to decrease complexity of DrawGallium.
*/
void (*DrawGalliumMultiMode)(struct gl_context *ctx,
- struct pipe_draw_info *info,
- unsigned drawid_offset,
- const struct pipe_draw_start_count_bias *draws,
- const unsigned char *mode,
- unsigned num_draws);
+ struct pipe_draw_info *info,
+ const struct pipe_draw_start_count_bias *draws,
+ const unsigned char *mode,
+ unsigned num_draws);
/**
* Draw a primitive, getting the vertex count, instance count, start
*/
void
_mesa_draw_gallium_multimode_fallback(struct gl_context *ctx,
- struct pipe_draw_info *info,
- unsigned drawid_offset,
- const struct pipe_draw_start_count_bias *draws,
- const unsigned char *mode,
- unsigned num_draws)
+ struct pipe_draw_info *info,
+ const struct pipe_draw_start_count_bias *draws,
+ const unsigned char *mode,
+ unsigned num_draws)
{
unsigned i, first;
for (i = 0, first = 0; i <= num_draws; i++) {
if (i == num_draws || mode[i] != mode[first]) {
info->mode = mode[first];
- ctx->Driver.DrawGallium(ctx, info, drawid_offset, &draws[first], i - first);
+ ctx->Driver.DrawGallium(ctx, info, 0, &draws[first], i - first);
first = i;
}
}
void
_mesa_draw_gallium_multimode_fallback(struct gl_context *ctx,
- struct pipe_draw_info *info,
- unsigned drawid_offset,
- const struct pipe_draw_start_count_bias *draws,
- const unsigned char *mode,
- unsigned num_draws);
+ struct pipe_draw_info *info,
+ const struct pipe_draw_start_count_bias *draws,
+ const unsigned char *mode,
+ unsigned num_draws);
void GLAPIENTRY
_mesa_EvalMesh1(GLenum mode, GLint i1, GLint i2);
static void
st_draw_gallium_multimode(struct gl_context *ctx,
- struct pipe_draw_info *info,
- unsigned drawid_offset,
- const struct pipe_draw_start_count_bias *draws,
- const unsigned char *mode,
- unsigned num_draws)
+ struct pipe_draw_info *info,
+ const struct pipe_draw_start_count_bias *draws,
+ const unsigned char *mode,
+ unsigned num_draws)
{
struct st_context *st = st_context(ctx);
for (i = 0, first = 0; i <= num_draws; i++) {
if (i == num_draws || mode[i] != mode[first]) {
info->mode = mode[first];
- cso_multi_draw(cso, info, drawid_offset, &draws[first], i - first);
+ cso_multi_draw(cso, info, 0, &draws[first], i - first);
first = i;
/* We can pass the reference only once. st_buffer_object keeps
exec->vtx.info.vertices_per_patch =
ctx->TessCtrlProgram.patch_vertices;
- ctx->Driver.DrawGalliumMultiMode(ctx, &exec->vtx.info, 0,
- exec->vtx.draw,
- exec->vtx.mode,
- exec->vtx.prim_count);
+ ctx->Driver.DrawGalliumMultiMode(ctx, &exec->vtx.info,
+ exec->vtx.draw,
+ exec->vtx.mode,
+ exec->vtx.prim_count);
/* Get new storage -- unless asked not to. */
if (!persistent_mapping)
info->vertices_per_patch = ctx->TessCtrlProgram.patch_vertices;
void *gl_bo = info->index.gl_bo;
if (node->merged.mode) {
- ctx->Driver.DrawGalliumMultiMode(ctx, info, 0,
+ ctx->Driver.DrawGalliumMultiMode(ctx, info,
node->merged.start_counts,
node->merged.mode,
node->merged.num_draws);