mesa: remove unused drawid_offset parameter from DrawGalliumMultiMode

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11939>
This commit is contained in:
Marek Olšák 2021-06-14 20:51:20 -04:00 committed by Marge Bot
parent 703279e6da
commit 73a03d12e9
6 changed files with 24 additions and 31 deletions

View File

@ -588,21 +588,17 @@ struct dd_function_table {
/**
* 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

View File

@ -1066,11 +1066,10 @@ _mesa_draw_gallium_fallback(struct gl_context *ctx,
*/
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;
@ -1078,7 +1077,7 @@ _mesa_draw_gallium_multimode_fallback(struct gl_context *ctx,
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;
}
}

View File

@ -96,11 +96,10 @@ _mesa_draw_gallium_fallback(struct gl_context *ctx,
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);

View File

@ -189,11 +189,10 @@ st_draw_gallium(struct gl_context *ctx,
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);
@ -209,7 +208,7 @@ st_draw_gallium_multimode(struct gl_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

View File

@ -333,10 +333,10 @@ vbo_exec_vtx_flush(struct vbo_exec_context *exec)
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)

View File

@ -243,7 +243,7 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data, bool copy_to_c
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);