From 4fe6c8552603fb78ec06d3b28c4e9dd01a6bdce6 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Sun, 11 Apr 2021 09:49:49 -0400 Subject: [PATCH] gallium: rename pipe_draw_start_count -> pipe_draw_start_count_bias MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit and add an index_bias member no functional changes yet, just the rename and unused struct member Reviewed-by: Marek Olšák Part-of: --- src/gallium/auxiliary/cso_cache/cso_context.c | 8 ++++---- src/gallium/auxiliary/cso_cache/cso_context.h | 4 ++-- src/gallium/auxiliary/draw/draw_context.h | 2 +- src/gallium/auxiliary/draw/draw_pt.c | 20 ++++++++++---------- src/gallium/auxiliary/driver_ddebug/dd_draw.c | 4 ++-- src/gallium/auxiliary/driver_ddebug/dd_pipe.h | 2 +- src/gallium/auxiliary/driver_noop/noop_state.c | 2 +- src/gallium/auxiliary/driver_rbug/rbug_context.c | 2 +- src/gallium/auxiliary/driver_trace/tr_context.c | 2 +- src/gallium/auxiliary/driver_trace/tr_dump_state.c | 4 ++-- src/gallium/auxiliary/driver_trace/tr_dump_state.h | 2 +- src/gallium/auxiliary/indices/u_primconvert.c | 6 +++--- src/gallium/auxiliary/indices/u_primconvert.h | 2 +- src/gallium/auxiliary/util/u_draw.c | 4 ++-- src/gallium/auxiliary/util/u_draw.h | 10 +++++----- src/gallium/auxiliary/util/u_dump.h | 2 +- src/gallium/auxiliary/util/u_dump_state.c | 4 ++-- src/gallium/auxiliary/util/u_helpers.c | 2 +- src/gallium/auxiliary/util/u_helpers.h | 2 +- src/gallium/auxiliary/util/u_prim_restart.c | 6 +++--- src/gallium/auxiliary/util/u_prim_restart.h | 4 ++-- src/gallium/auxiliary/util/u_threaded_context.c | 16 ++++++++-------- src/gallium/auxiliary/util/u_threaded_context.h | 2 +- src/gallium/auxiliary/util/u_vbuf.c | 12 ++++++------ src/gallium/auxiliary/util/u_vbuf.h | 4 ++-- src/gallium/drivers/d3d12/d3d12_context.h | 2 +- src/gallium/drivers/d3d12/d3d12_draw.cpp | 8 ++++---- src/gallium/drivers/etnaviv/etnaviv_context.c | 2 +- src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 6 +++--- src/gallium/drivers/freedreno/a3xx/fd3_draw.c | 2 +- src/gallium/drivers/freedreno/a3xx/fd3_emit.h | 2 +- src/gallium/drivers/freedreno/a4xx/fd4_draw.c | 2 +- src/gallium/drivers/freedreno/a4xx/fd4_draw.h | 2 +- src/gallium/drivers/freedreno/a4xx/fd4_emit.h | 2 +- src/gallium/drivers/freedreno/a5xx/fd5_draw.c | 2 +- src/gallium/drivers/freedreno/a5xx/fd5_draw.h | 2 +- src/gallium/drivers/freedreno/a5xx/fd5_emit.h | 2 +- src/gallium/drivers/freedreno/a6xx/fd6_draw.c | 4 ++-- src/gallium/drivers/freedreno/a6xx/fd6_emit.h | 2 +- src/gallium/drivers/freedreno/a6xx/fd6_vsc.c | 6 +++--- src/gallium/drivers/freedreno/a6xx/fd6_vsc.h | 2 +- src/gallium/drivers/freedreno/freedreno_blitter.c | 2 +- src/gallium/drivers/freedreno/freedreno_context.h | 2 +- src/gallium/drivers/freedreno/freedreno_draw.c | 4 ++-- src/gallium/drivers/freedreno/freedreno_draw.h | 2 +- src/gallium/drivers/freedreno/ir3/ir3_const.h | 4 ++-- src/gallium/drivers/i915/i915_context.c | 2 +- src/gallium/drivers/iris/iris_context.h | 2 +- src/gallium/drivers/iris/iris_draw.c | 8 ++++---- src/gallium/drivers/iris/iris_measure.c | 2 +- src/gallium/drivers/iris/iris_measure.h | 2 +- src/gallium/drivers/iris/iris_screen.h | 2 +- src/gallium/drivers/iris/iris_state.c | 2 +- src/gallium/drivers/lima/lima_draw.c | 18 +++++++++--------- src/gallium/drivers/llvmpipe/lp_draw_arrays.c | 2 +- src/gallium/drivers/nouveau/nv30/nv30_context.h | 4 ++-- src/gallium/drivers/nouveau/nv30/nv30_draw.c | 2 +- src/gallium/drivers/nouveau/nv30/nv30_push.c | 2 +- src/gallium/drivers/nouveau/nv30/nv30_vbo.c | 2 +- src/gallium/drivers/nouveau/nv50/nv50_context.h | 4 ++-- src/gallium/drivers/nouveau/nv50/nv50_push.c | 2 +- src/gallium/drivers/nouveau/nv50/nv50_vbo.c | 2 +- src/gallium/drivers/nouveau/nvc0/nvc0_context.h | 6 +++--- src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c | 2 +- .../drivers/nouveau/nvc0/nvc0_vbo_translate.c | 10 +++++----- src/gallium/drivers/panfrost/pan_cmdstream.c | 2 +- src/gallium/drivers/panfrost/pan_cmdstream.h | 2 +- src/gallium/drivers/panfrost/pan_context.c | 12 ++++++------ src/gallium/drivers/r300/r300_render.c | 20 ++++++++++---------- src/gallium/drivers/r300/r300_render_stencilref.c | 4 ++-- src/gallium/drivers/r600/r600_state_common.c | 2 +- .../drivers/radeonsi/si_compute_prim_discard.c | 4 ++-- src/gallium/drivers/radeonsi/si_pipe.h | 4 ++-- src/gallium/drivers/radeonsi/si_state_draw.cpp | 10 +++++----- src/gallium/drivers/softpipe/sp_draw_arrays.c | 2 +- src/gallium/drivers/softpipe/sp_state.h | 2 +- src/gallium/drivers/svga/svga_draw.h | 2 +- src/gallium/drivers/svga/svga_draw_elements.c | 4 ++-- src/gallium/drivers/svga/svga_pipe_draw.c | 4 ++-- src/gallium/drivers/svga/svga_swtnl.h | 2 +- src/gallium/drivers/svga/svga_swtnl_backend.c | 2 +- src/gallium/drivers/svga/svga_swtnl_draw.c | 2 +- src/gallium/drivers/swr/swr_draw.cpp | 4 ++-- src/gallium/drivers/swr/swr_state.cpp | 2 +- src/gallium/drivers/swr/swr_state.h | 2 +- src/gallium/drivers/tegra/tegra_context.c | 2 +- src/gallium/drivers/v3d/v3dx_draw.c | 4 ++-- src/gallium/drivers/vc4/vc4_draw.c | 2 +- src/gallium/drivers/virgl/virgl_context.c | 2 +- src/gallium/drivers/virgl/virgl_encode.c | 2 +- src/gallium/drivers/virgl/virgl_encode.h | 2 +- src/gallium/drivers/zink/zink_context.h | 2 +- src/gallium/drivers/zink/zink_draw.c | 2 +- src/gallium/frontends/lavapipe/lvp_cmd_buffer.c | 4 ++-- src/gallium/frontends/lavapipe/lvp_execute.c | 6 +++--- src/gallium/frontends/lavapipe/lvp_private.h | 4 ++-- src/gallium/frontends/nine/device9.c | 2 +- src/gallium/frontends/nine/nine_state.c | 8 ++++---- src/gallium/include/pipe/p_context.h | 4 ++-- src/gallium/include/pipe/p_state.h | 3 ++- src/gallium/tests/graw/tri-instanced.c | 2 +- src/mesa/main/dd.h | 6 +++--- src/mesa/main/draw.c | 14 +++++++------- src/mesa/main/draw.h | 4 ++-- src/mesa/state_tracker/st_draw.c | 10 +++++----- src/mesa/state_tracker/st_draw_feedback.c | 2 +- src/mesa/vbo/vbo.h | 6 +++--- src/mesa/vbo/vbo_exec_api.c | 4 ++-- src/mesa/vbo/vbo_minmax_index.c | 4 ++-- src/mesa/vbo/vbo_save.h | 2 +- src/mesa/vbo/vbo_save_api.c | 2 +- 111 files changed, 230 insertions(+), 229 deletions(-) diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index f10c616..da4bc3c 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -1403,7 +1403,7 @@ void cso_draw_vbo(struct cso_context *cso, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count draw) + const struct pipe_draw_start_count_bias draw) { struct u_vbuf *vbuf = cso->vbuf_current; @@ -1429,7 +1429,7 @@ cso_draw_vbo(struct cso_context *cso, void cso_multi_draw(struct cso_context *cso, struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { struct u_vbuf *vbuf = cso->vbuf_current; @@ -1458,7 +1458,7 @@ void cso_draw_arrays(struct cso_context *cso, uint mode, uint start, uint count) { struct pipe_draw_info info; - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; util_draw_init_info(&info); @@ -1479,7 +1479,7 @@ cso_draw_arrays_instanced(struct cso_context *cso, uint mode, uint start_instance, uint instance_count) { struct pipe_draw_info info; - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; util_draw_init_info(&info); diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h b/src/gallium/auxiliary/cso_cache/cso_context.h index 826e153..a222046 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.h +++ b/src/gallium/auxiliary/cso_cache/cso_context.h @@ -179,13 +179,13 @@ void cso_draw_vbo(struct cso_context *cso, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count draw); + const struct pipe_draw_start_count_bias draw); /* info->draw_id can be changed by the callee if increment_draw_id is true. */ void cso_multi_draw(struct cso_context *cso, struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); void diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h index 1ea9c49..19f04d5 100644 --- a/src/gallium/auxiliary/draw/draw_context.h +++ b/src/gallium/auxiliary/draw/draw_context.h @@ -326,7 +326,7 @@ draw_set_mapped_so_targets(struct draw_context *draw, void draw_vbo(struct draw_context *draw, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c index a41a849..551a8b9 100644 --- a/src/gallium/auxiliary/draw/draw_pt.c +++ b/src/gallium/auxiliary/draw/draw_pt.c @@ -56,7 +56,7 @@ DEBUG_GET_ONCE_BOOL_OPTION(draw_no_fse, "DRAW_NO_FSE", FALSE) static boolean draw_pt_arrays(struct draw_context *draw, unsigned prim, - const struct pipe_draw_start_count *draw_info, + const struct pipe_draw_start_count_bias *draw_info, unsigned num_draws) { struct draw_pt_front_end *frontend = NULL; @@ -363,7 +363,7 @@ prim_restart_loop(struct draw_context *draw, const void *elements) { const unsigned elt_max = draw->pt.user.eltMax; - struct pipe_draw_start_count cur; + struct pipe_draw_start_count_bias cur; cur.start = start; cur.count = 0; @@ -414,7 +414,7 @@ prim_restart_loop(struct draw_context *draw, static void draw_pt_arrays_restart(struct draw_context *draw, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw_info, + const struct pipe_draw_start_count_bias *draw_info, unsigned num_draws) { const unsigned prim = info->mode; @@ -444,13 +444,13 @@ draw_pt_arrays_restart(struct draw_context *draw, static void resolve_draw_info(const struct pipe_draw_info *raw_info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *raw_draw, + const struct pipe_draw_start_count_bias *raw_draw, struct pipe_draw_info *info, - struct pipe_draw_start_count *draw, + struct pipe_draw_start_count_bias *draw, struct pipe_vertex_buffer *vertex_buffer) { memcpy(info, raw_info, sizeof(struct pipe_draw_info)); - memcpy(draw, raw_draw, sizeof(struct pipe_draw_start_count)); + memcpy(draw, raw_draw, sizeof(struct pipe_draw_start_count_bias)); struct draw_so_target *target = (struct draw_so_target *)indirect->count_from_stream_output; @@ -469,7 +469,7 @@ resolve_draw_info(const struct pipe_draw_info *raw_info, static void draw_instances(struct draw_context *draw, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { unsigned instance; @@ -507,15 +507,15 @@ void draw_vbo(struct draw_context *draw, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { unsigned index_limit; unsigned fpstate = util_fpstate_get(); struct pipe_draw_info resolved_info; - struct pipe_draw_start_count resolved_draw; + struct pipe_draw_start_count_bias resolved_draw; struct pipe_draw_info *use_info = (struct pipe_draw_info *)info; - struct pipe_draw_start_count *use_draws = (struct pipe_draw_start_count *)draws; + struct pipe_draw_start_count_bias *use_draws = (struct pipe_draw_start_count_bias *)draws; if (info->instance_count == 0) return; diff --git a/src/gallium/auxiliary/driver_ddebug/dd_draw.c b/src/gallium/auxiliary/driver_ddebug/dd_draw.c index 9fc776d..a55ce32 100644 --- a/src/gallium/auxiliary/driver_ddebug/dd_draw.c +++ b/src/gallium/auxiliary/driver_ddebug/dd_draw.c @@ -353,7 +353,7 @@ dd_dump_flush(struct dd_draw_state *dstate, struct call_flush *info, FILE *f) static void dd_dump_draw_vbo(struct dd_draw_state *dstate, struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw, FILE *f) + const struct pipe_draw_start_count_bias *draw, FILE *f) { int sh, i; @@ -1304,7 +1304,7 @@ static void dd_context_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { struct dd_context *dctx = dd_context(_pipe); diff --git a/src/gallium/auxiliary/driver_ddebug/dd_pipe.h b/src/gallium/auxiliary/driver_ddebug/dd_pipe.h index 25bfc74..2bdcea8 100644 --- a/src/gallium/auxiliary/driver_ddebug/dd_pipe.h +++ b/src/gallium/auxiliary/driver_ddebug/dd_pipe.h @@ -124,7 +124,7 @@ struct call_flush { struct call_draw_info { struct pipe_draw_info info; struct pipe_draw_indirect_info indirect; - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; }; struct call_get_query_result_resource { diff --git a/src/gallium/auxiliary/driver_noop/noop_state.c b/src/gallium/auxiliary/driver_noop/noop_state.c index fb90a1e..9386535 100644 --- a/src/gallium/auxiliary/driver_noop/noop_state.c +++ b/src/gallium/auxiliary/driver_noop/noop_state.c @@ -32,7 +32,7 @@ static void noop_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { } diff --git a/src/gallium/auxiliary/driver_rbug/rbug_context.c b/src/gallium/auxiliary/driver_rbug/rbug_context.c index 4f72eb8..cec9756 100644 --- a/src/gallium/auxiliary/driver_rbug/rbug_context.c +++ b/src/gallium/auxiliary/driver_rbug/rbug_context.c @@ -116,7 +116,7 @@ rbug_draw_block_locked(struct rbug_context *rb_pipe, int flag) static void rbug_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *_info, const struct pipe_draw_indirect_info *_indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { struct rbug_context *rb_pipe = rbug_context(_pipe); diff --git a/src/gallium/auxiliary/driver_trace/tr_context.c b/src/gallium/auxiliary/driver_trace/tr_context.c index e64e01a..e2c4cc3 100644 --- a/src/gallium/auxiliary/driver_trace/tr_context.c +++ b/src/gallium/auxiliary/driver_trace/tr_context.c @@ -111,7 +111,7 @@ static void trace_context_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { struct trace_context *tr_ctx = trace_context(_pipe); diff --git a/src/gallium/auxiliary/driver_trace/tr_dump_state.c b/src/gallium/auxiliary/driver_trace/tr_dump_state.c index ec479b5..c74b9dc 100644 --- a/src/gallium/auxiliary/driver_trace/tr_dump_state.c +++ b/src/gallium/auxiliary/driver_trace/tr_dump_state.c @@ -811,12 +811,12 @@ void trace_dump_draw_info(const struct pipe_draw_info *state) trace_dump_struct_end(); } -void trace_dump_draw_start_count(const struct pipe_draw_start_count *state) +void trace_dump_draw_start_count(const struct pipe_draw_start_count_bias *state) { if (!trace_dumping_enabled_locked()) return; - trace_dump_struct_begin("pipe_draw_start_count"); + trace_dump_struct_begin("pipe_draw_start_count_bias"); trace_dump_member(uint, state, start); trace_dump_member(uint, state, count); trace_dump_struct_end(); diff --git a/src/gallium/auxiliary/driver_trace/tr_dump_state.h b/src/gallium/auxiliary/driver_trace/tr_dump_state.h index 1a969c7..5b32cac 100644 --- a/src/gallium/auxiliary/driver_trace/tr_dump_state.h +++ b/src/gallium/auxiliary/driver_trace/tr_dump_state.h @@ -86,7 +86,7 @@ void trace_dump_shader_buffer(const struct pipe_shader_buffer *buffer); void trace_dump_draw_info(const struct pipe_draw_info *state); -void trace_dump_draw_start_count(const struct pipe_draw_start_count *state); +void trace_dump_draw_start_count(const struct pipe_draw_start_count_bias *state); void trace_dump_draw_indirect_info(const struct pipe_draw_indirect_info *state); diff --git a/src/gallium/auxiliary/indices/u_primconvert.c b/src/gallium/auxiliary/indices/u_primconvert.c index 0841824..ff8bf86 100644 --- a/src/gallium/auxiliary/indices/u_primconvert.c +++ b/src/gallium/auxiliary/indices/u_primconvert.c @@ -100,11 +100,11 @@ void util_primconvert_draw_vbo(struct primconvert_context *pc, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { struct pipe_draw_info new_info; - struct pipe_draw_start_count new_draw; + struct pipe_draw_start_count_bias new_draw; struct pipe_transfer *src_transfer = NULL; u_translate_func trans_func; u_generate_func gen_func; @@ -128,7 +128,7 @@ util_primconvert_draw_vbo(struct primconvert_context *pc, return; } - const struct pipe_draw_start_count *draw = &draws[0]; + const struct pipe_draw_start_count_bias *draw = &draws[0]; /* Filter out degenerate primitives, u_upload_alloc() will assert * on size==0 so just bail: diff --git a/src/gallium/auxiliary/indices/u_primconvert.h b/src/gallium/auxiliary/indices/u_primconvert.h index f875085..d853a71 100644 --- a/src/gallium/auxiliary/indices/u_primconvert.h +++ b/src/gallium/auxiliary/indices/u_primconvert.h @@ -48,7 +48,7 @@ void util_primconvert_save_rasterizer_state(struct primconvert_context *pc, void util_primconvert_draw_vbo(struct primconvert_context *pc, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); #endif /* U_PRIMCONVERT_H_ */ diff --git a/src/gallium/auxiliary/util/u_draw.c b/src/gallium/auxiliary/util/u_draw.c index 6133896..802aa48 100644 --- a/src/gallium/auxiliary/util/u_draw.c +++ b/src/gallium/auxiliary/util/u_draw.c @@ -176,7 +176,7 @@ util_draw_indirect(struct pipe_context *pipe, } for (unsigned i = 0; i < draw_count; i++) { - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; draw.count = params[0]; info.instance_count = params[1]; @@ -195,7 +195,7 @@ util_draw_indirect(struct pipe_context *pipe, void util_draw_multi(struct pipe_context *pctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { struct pipe_draw_info tmp_info = *info; diff --git a/src/gallium/auxiliary/util/u_draw.h b/src/gallium/auxiliary/util/u_draw.h index 6f8601f..287d2b5 100644 --- a/src/gallium/auxiliary/util/u_draw.h +++ b/src/gallium/auxiliary/util/u_draw.h @@ -55,7 +55,7 @@ util_draw_arrays(struct pipe_context *pipe, uint count) { struct pipe_draw_info info; - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; util_draw_init_info(&info); info.mode = mode; @@ -77,7 +77,7 @@ util_draw_elements(struct pipe_context *pipe, uint count) { struct pipe_draw_info info; - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; util_draw_init_info(&info); info.index.user = indices; @@ -101,7 +101,7 @@ util_draw_arrays_instanced(struct pipe_context *pipe, uint instance_count) { struct pipe_draw_info info; - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; util_draw_init_info(&info); info.mode = mode; @@ -129,7 +129,7 @@ util_draw_elements_instanced(struct pipe_context *pipe, uint instance_count) { struct pipe_draw_info info; - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; util_draw_init_info(&info); info.index.user = indices; @@ -161,7 +161,7 @@ util_draw_indirect(struct pipe_context *pipe, void util_draw_multi(struct pipe_context *pctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); unsigned diff --git a/src/gallium/auxiliary/util/u_dump.h b/src/gallium/auxiliary/util/u_dump.h index bac1d12..a4f1f0a 100644 --- a/src/gallium/auxiliary/util/u_dump.h +++ b/src/gallium/auxiliary/util/u_dump.h @@ -201,7 +201,7 @@ void util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state); void -util_dump_draw_start_count(FILE *stream, const struct pipe_draw_start_count *state); +util_dump_draw_start_count(FILE *stream, const struct pipe_draw_start_count_bias *state); void util_dump_draw_indirect_info(FILE *stream, diff --git a/src/gallium/auxiliary/util/u_dump_state.c b/src/gallium/auxiliary/util/u_dump_state.c index a72b372..6ef5e0e 100644 --- a/src/gallium/auxiliary/util/u_dump_state.c +++ b/src/gallium/auxiliary/util/u_dump_state.c @@ -935,9 +935,9 @@ util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state) } void -util_dump_draw_start_count(FILE *stream, const struct pipe_draw_start_count *state) +util_dump_draw_start_count(FILE *stream, const struct pipe_draw_start_count_bias *state) { - util_dump_struct_begin(stream, "pipe_draw_start_count"); + util_dump_struct_begin(stream, "pipe_draw_start_count_bias"); util_dump_member(stream, uint, state, start); util_dump_member(stream, uint, state, count); util_dump_struct_end(stream); diff --git a/src/gallium/auxiliary/util/u_helpers.c b/src/gallium/auxiliary/util/u_helpers.c index 210c509..1d2707e 100644 --- a/src/gallium/auxiliary/util/u_helpers.c +++ b/src/gallium/auxiliary/util/u_helpers.c @@ -151,7 +151,7 @@ void util_set_shader_buffers_mask(struct pipe_shader_buffer *dst, bool util_upload_index_buffer(struct pipe_context *pipe, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, struct pipe_resource **out_buffer, unsigned *out_offset, unsigned alignment) { diff --git a/src/gallium/auxiliary/util/u_helpers.h b/src/gallium/auxiliary/util/u_helpers.h index 6489bdc..a3f15cd 100644 --- a/src/gallium/auxiliary/util/u_helpers.h +++ b/src/gallium/auxiliary/util/u_helpers.h @@ -58,7 +58,7 @@ void util_set_shader_buffers_mask(struct pipe_shader_buffer *dst, bool util_upload_index_buffer(struct pipe_context *pipe, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, struct pipe_resource **out_buffer, unsigned *out_offset, unsigned alignment); diff --git a/src/gallium/auxiliary/util/u_prim_restart.c b/src/gallium/auxiliary/util/u_prim_restart.c index 8d16409..0b9f37e 100644 --- a/src/gallium/auxiliary/util/u_prim_restart.c +++ b/src/gallium/auxiliary/util/u_prim_restart.c @@ -100,7 +100,7 @@ enum pipe_error util_translate_prim_restart_ib(struct pipe_context *context, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect_info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, struct pipe_resource **dst_buffer) { struct pipe_screen *screen = context->screen; @@ -224,12 +224,12 @@ enum pipe_error util_draw_vbo_without_prim_restart(struct pipe_context *context, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect_info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { const void *src_map; struct range_info ranges = {0}; struct pipe_draw_info new_info; - struct pipe_draw_start_count new_draw; + struct pipe_draw_start_count_bias new_draw; struct pipe_transfer *src_transfer = NULL; unsigned i, start, count; DrawElementsIndirectCommand indirect; diff --git a/src/gallium/auxiliary/util/u_prim_restart.h b/src/gallium/auxiliary/util/u_prim_restart.h index 5ba89de..b76acc3 100644 --- a/src/gallium/auxiliary/util/u_prim_restart.h +++ b/src/gallium/auxiliary/util/u_prim_restart.h @@ -50,14 +50,14 @@ enum pipe_error util_translate_prim_restart_ib(struct pipe_context *context, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, struct pipe_resource **dst_buffer); enum pipe_error util_draw_vbo_without_prim_restart(struct pipe_context *context, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw); + const struct pipe_draw_start_count_bias *draw); static inline unsigned util_prim_restart_index_from_size(unsigned index_size) diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index 02da016..36b6e3b 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -192,7 +192,7 @@ tc_batch_execute(void *job, UNUSED int thread_index) first_info->info.drawid == 0 && is_next_call_a_mergeable_draw(first_info, next, &next_info)) { /* Merge up to 256 draw calls. */ - struct pipe_draw_start_count multi[256]; + struct pipe_draw_start_count_bias multi[256]; unsigned num_draws = 2; /* u_threaded_context stores start/count in min/max_index for single draws. */ @@ -2389,10 +2389,10 @@ tc_call_draw_single(struct pipe_context *pipe, union tc_payload *payload) /* u_threaded_context stores start/count in min/max_index for single draws. */ /* Drivers using u_threaded_context shouldn't use min/max_index. */ - struct pipe_draw_start_count *draw = - (struct pipe_draw_start_count *)&info->info.min_index; - STATIC_ASSERT(offsetof(struct pipe_draw_start_count, start) == 0); - STATIC_ASSERT(offsetof(struct pipe_draw_start_count, count) == 4); + struct pipe_draw_start_count_bias *draw = + (struct pipe_draw_start_count_bias *)&info->info.min_index; + STATIC_ASSERT(offsetof(struct pipe_draw_start_count_bias, start) == 0); + STATIC_ASSERT(offsetof(struct pipe_draw_start_count_bias, count) == 4); info->info.index_bounds_valid = false; info->info.has_user_indices = false; @@ -2406,7 +2406,7 @@ tc_call_draw_single(struct pipe_context *pipe, union tc_payload *payload) struct tc_draw_indirect { struct pipe_draw_info info; struct pipe_draw_indirect_info indirect; - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; }; static void @@ -2429,7 +2429,7 @@ tc_call_draw_indirect(struct pipe_context *pipe, union tc_payload *payload) struct tc_draw_multi { struct pipe_draw_info info; unsigned num_draws; - struct pipe_draw_start_count slot[]; /* variable-sized array */ + struct pipe_draw_start_count_bias slot[]; /* variable-sized array */ }; static void @@ -2452,7 +2452,7 @@ tc_call_draw_multi(struct pipe_context *pipe, union tc_payload *payload) void tc_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { STATIC_ASSERT(DRAW_INFO_SIZE_WITHOUT_INDEXBUF_AND_MIN_MAX_INDEX + diff --git a/src/gallium/auxiliary/util/u_threaded_context.h b/src/gallium/auxiliary/util/u_threaded_context.h index 468221b..6a1cb67 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.h +++ b/src/gallium/auxiliary/util/u_threaded_context.h @@ -411,7 +411,7 @@ threaded_context_flush(struct pipe_context *_pipe, void tc_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); static inline struct threaded_context * diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index 89fd5c9..0f140d6 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -406,7 +406,7 @@ void u_vbuf_destroy(struct u_vbuf *mgr) static enum pipe_error u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, unsigned vb_mask, unsigned out_vb, int start_vertex, unsigned num_vertices, int min_index, boolean unroll_indices) @@ -609,7 +609,7 @@ u_vbuf_translate_find_free_vb_slots(struct u_vbuf *mgr, static boolean u_vbuf_translate_begin(struct u_vbuf *mgr, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, int start_vertex, unsigned num_vertices, int min_index, boolean unroll_indices) { @@ -1236,7 +1236,7 @@ u_vbuf_get_minmax_index_mapped(const struct pipe_draw_info *info, void u_vbuf_get_minmax_index(struct pipe_context *pipe, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, unsigned *out_min_index, unsigned *out_max_index) { struct pipe_transfer *transfer = NULL; @@ -1287,7 +1287,7 @@ u_vbuf_split_indexed_multidraw(struct u_vbuf *mgr, struct pipe_draw_info *info, assert(info->index_size); for (unsigned i = 0; i < draw_count; i++) { - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; unsigned offset = i * stride / 4; draw.count = indirect_data[offset + 0]; @@ -1302,7 +1302,7 @@ u_vbuf_split_indexed_multidraw(struct u_vbuf *mgr, struct pipe_draw_info *info, void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count draw) + const struct pipe_draw_start_count_bias draw) { struct pipe_context *pipe = mgr->pipe; int start_vertex; @@ -1314,7 +1314,7 @@ void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info, const uint32_t incompatible_vb_mask = mgr->incompatible_vb_mask & used_vb_mask; struct pipe_draw_info new_info; - struct pipe_draw_start_count new_draw; + struct pipe_draw_start_count_bias new_draw; /* Normal draw. No fallback and no user buffers. */ if (!incompatible_vb_mask && diff --git a/src/gallium/auxiliary/util/u_vbuf.h b/src/gallium/auxiliary/util/u_vbuf.h index fcf99fc..33b4d29 100644 --- a/src/gallium/auxiliary/util/u_vbuf.h +++ b/src/gallium/auxiliary/util/u_vbuf.h @@ -81,10 +81,10 @@ void u_vbuf_set_vertex_buffers(struct u_vbuf *mgr, const struct pipe_vertex_buffer *bufs); void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count draw); + const struct pipe_draw_start_count_bias draw); void u_vbuf_get_minmax_index(struct pipe_context *pipe, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, unsigned *out_min_index, unsigned *out_max_index); /* Save/restore functionality. */ diff --git a/src/gallium/drivers/d3d12/d3d12_context.h b/src/gallium/drivers/d3d12/d3d12_context.h index dc7b1f3..6b0a96d 100644 --- a/src/gallium/drivers/d3d12/d3d12_context.h +++ b/src/gallium/drivers/d3d12/d3d12_context.h @@ -291,7 +291,7 @@ void d3d12_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *dinfo, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); void diff --git a/src/gallium/drivers/d3d12/d3d12_draw.cpp b/src/gallium/drivers/d3d12/d3d12_draw.cpp index b46f2de..d37d74f 100644 --- a/src/gallium/drivers/d3d12/d3d12_draw.cpp +++ b/src/gallium/drivers/d3d12/d3d12_draw.cpp @@ -168,7 +168,7 @@ fill_sampler_descriptors(struct d3d12_context *ctx, static unsigned fill_state_vars(struct d3d12_context *ctx, const struct pipe_draw_info *dinfo, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, struct d3d12_shader *shader, uint32_t *values) { @@ -244,7 +244,7 @@ check_descriptors_left(struct d3d12_context *ctx) static void set_graphics_root_parameters(struct d3d12_context *ctx, const struct pipe_draw_info *dinfo, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { unsigned num_params = 0; @@ -358,7 +358,7 @@ static void twoface_emulation(struct d3d12_context *ctx, struct d3d12_rasterizer_state *rast, const struct pipe_draw_info *dinfo, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { /* draw backfaces */ ctx->base.bind_rasterizer_state(&ctx->base, rast->twoface_back); @@ -424,7 +424,7 @@ void d3d12_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *dinfo, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.c b/src/gallium/drivers/etnaviv/etnaviv_context.c index 2fae69d..64c458c 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_context.c +++ b/src/gallium/drivers/etnaviv/etnaviv_context.c @@ -226,7 +226,7 @@ etna_get_fs(struct etna_context *ctx, struct etna_shader_key key) static void etna_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_draw.c b/src/gallium/drivers/freedreno/a2xx/fd2_draw.c index ff3c22c..97d8eab 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_draw.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_draw.c @@ -78,7 +78,7 @@ emit_vertexbufs(struct fd_context *ctx) assert_dt static void draw_impl(struct fd_context *ctx, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, struct fd_ringbuffer *ring, + const struct pipe_draw_start_count_bias *draw, struct fd_ringbuffer *ring, unsigned index_offset, bool binning) assert_dt { OUT_PKT3(ring, CP_SET_CONSTANT, 2); @@ -154,7 +154,7 @@ draw_impl(struct fd_context *ctx, const struct pipe_draw_info *info, static bool fd2_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *pinfo, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *pdraw, + const struct pipe_draw_start_count_bias *pdraw, unsigned index_offset) assert_dt { if (!ctx->prog.fs || !ctx->prog.vs) @@ -190,7 +190,7 @@ fd2_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *pinfo, }; /* clang-format on */ - struct pipe_draw_start_count draw = *pdraw; + struct pipe_draw_start_count_bias draw = *pdraw; unsigned count = draw.count; unsigned step = step_tbl[pinfo->mode]; unsigned num_vertices = ctx->batch->num_vertices; diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c index 35336cf..5ec3e50 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c @@ -97,7 +97,7 @@ draw_impl(struct fd_context *ctx, struct fd_ringbuffer *ring, static bool fd3_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, unsigned index_offset) in_dt { struct fd3_emit emit = { diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.h b/src/gallium/drivers/freedreno/a3xx/fd3_emit.h index 44621dc..e28bb4d 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.h +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.h @@ -48,7 +48,7 @@ struct fd3_emit { const struct fd3_program_state *prog; const struct pipe_draw_info *info; const struct pipe_draw_indirect_info *indirect; - const struct pipe_draw_start_count *draw; + const struct pipe_draw_start_count_bias *draw; bool binning_pass; struct ir3_cache_key key; enum fd_dirty_3d_state dirty; diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_draw.c b/src/gallium/drivers/freedreno/a4xx/fd4_draw.c index 3a26a6c..f17a485 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_draw.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_draw.c @@ -74,7 +74,7 @@ draw_impl(struct fd_context *ctx, struct fd_ringbuffer *ring, static bool fd4_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, unsigned index_offset) in_dt { struct fd4_context *fd4_ctx = fd4_context(ctx); diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_draw.h b/src/gallium/drivers/freedreno/a4xx/fd4_draw.h index 29e8470..9816d40 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_draw.h +++ b/src/gallium/drivers/freedreno/a4xx/fd4_draw.h @@ -88,7 +88,7 @@ fd4_draw_emit(struct fd_batch *batch, struct fd_ringbuffer *ring, enum pc_di_primtype primtype, enum pc_di_vis_cull_mode vismode, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw, unsigned index_offset) + const struct pipe_draw_start_count_bias *draw, unsigned index_offset) { struct pipe_resource *idx_buffer = NULL; enum a4xx_index_size idx_type; diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_emit.h b/src/gallium/drivers/freedreno/a4xx/fd4_emit.h index d0cebec..889922f 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_emit.h +++ b/src/gallium/drivers/freedreno/a4xx/fd4_emit.h @@ -46,7 +46,7 @@ struct fd4_emit { const struct fd4_program_state *prog; const struct pipe_draw_info *info; const struct pipe_draw_indirect_info *indirect; - const struct pipe_draw_start_count *draw; + const struct pipe_draw_start_count_bias *draw; bool binning_pass; struct ir3_cache_key key; enum fd_dirty_3d_state dirty; diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_draw.c b/src/gallium/drivers/freedreno/a5xx/fd5_draw.c index ee718cc..9b6fb43 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_draw.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_draw.c @@ -70,7 +70,7 @@ draw_impl(struct fd_context *ctx, struct fd_ringbuffer *ring, static bool fd5_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, unsigned index_offset) in_dt { struct fd5_context *fd5_ctx = fd5_context(ctx); diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_draw.h b/src/gallium/drivers/freedreno/a5xx/fd5_draw.h index 59fa77c..c7895ac 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_draw.h +++ b/src/gallium/drivers/freedreno/a5xx/fd5_draw.h @@ -82,7 +82,7 @@ fd5_draw_emit(struct fd_batch *batch, struct fd_ringbuffer *ring, enum pc_di_primtype primtype, enum pc_di_vis_cull_mode vismode, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw, unsigned index_offset) + const struct pipe_draw_start_count_bias *draw, unsigned index_offset) { struct pipe_resource *idx_buffer = NULL; enum a4xx_index_size idx_type; diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_emit.h b/src/gallium/drivers/freedreno/a5xx/fd5_emit.h index ef6ced5..d35824e 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_emit.h +++ b/src/gallium/drivers/freedreno/a5xx/fd5_emit.h @@ -46,7 +46,7 @@ struct fd5_emit { const struct fd5_program_state *prog; const struct pipe_draw_info *info; const struct pipe_draw_indirect_info *indirect; - const struct pipe_draw_start_count *draw; + const struct pipe_draw_start_count_bias *draw; bool binning_pass; struct ir3_cache_key key; enum fd_dirty_3d_state dirty; diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c index e5ab083..fd797b4 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c @@ -96,7 +96,7 @@ draw_emit_indirect(struct fd_ringbuffer *ring, static void draw_emit(struct fd_ringbuffer *ring, struct CP_DRAW_INDX_OFFSET_0 *draw0, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, unsigned index_offset) + const struct pipe_draw_start_count_bias *draw, unsigned index_offset) { if (info->index_size) { assert(!info->has_user_indices); @@ -133,7 +133,7 @@ fixup_draw_state(struct fd_context *ctx, struct fd6_emit *emit) assert_dt static bool fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, unsigned index_offset) assert_dt { struct fd6_context *fd6_ctx = fd6_context(ctx); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h index 4775c95..7cde37e 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h @@ -90,7 +90,7 @@ struct fd6_emit { const struct fd_vertex_state *vtx; const struct pipe_draw_info *info; const struct pipe_draw_indirect_info *indirect; - const struct pipe_draw_start_count *draw; + const struct pipe_draw_start_count_bias *draw; struct ir3_cache_key key; enum fd_dirty_3d_state dirty; uint32_t dirty_groups; diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_vsc.c b/src/gallium/drivers/freedreno/a6xx/fd6_vsc.c index f7d63ee..8672717 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_vsc.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_vsc.c @@ -63,7 +63,7 @@ bitfield_size_bits(unsigned n) static unsigned prim_count(const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { /* PIPE_PRIM_MAX used internally for RECTLIST blits on 3d pipe: */ unsigned vtx_per_prim = @@ -89,7 +89,7 @@ prim_count(const struct pipe_draw_info *info, */ static unsigned primitive_stream_size_bits(const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, unsigned num_bins) { unsigned num_prims = prim_count(info, draw); @@ -128,7 +128,7 @@ draw_stream_size_bits(const struct pipe_draw_info *info, unsigned num_bins, void fd6_vsc_update_sizes(struct fd_batch *batch, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { if (!batch->num_bins_per_pipe) { batch->num_bins_per_pipe = fd_gmem_estimate_bins_per_pipe(batch); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_vsc.h b/src/gallium/drivers/freedreno/a6xx/fd6_vsc.h index b1aa099..75db069 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_vsc.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_vsc.h @@ -26,6 +26,6 @@ void fd6_vsc_update_sizes(struct fd_batch *batch, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw); + const struct pipe_draw_start_count_bias *draw); #endif /* FD6_VSC_H_ */ diff --git a/src/gallium/drivers/freedreno/freedreno_blitter.c b/src/gallium/drivers/freedreno/freedreno_blitter.c index c188d17..4618664 100644 --- a/src/gallium/drivers/freedreno/freedreno_blitter.c +++ b/src/gallium/drivers/freedreno/freedreno_blitter.c @@ -241,7 +241,7 @@ fd_blitter_clear(struct pipe_context *pctx, unsigned buffers, .max_index = 1, .instance_count = MAX2(1, pfb->layers), }; - struct pipe_draw_start_count draw = { + struct pipe_draw_start_count_bias draw = { .count = 2, }; pctx->draw_vbo(pctx, &info, NULL, &draw, 1); diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h index d85861b..81957f4 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -464,7 +464,7 @@ struct fd_context { /* draw: */ bool (*draw_vbo)(struct fd_context *ctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, unsigned index_offset) dt; bool (*clear)(struct fd_context *ctx, unsigned buffers, const union pipe_color_union *color, double depth, diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c index 263dbcd..ce7e443 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.c +++ b/src/gallium/drivers/freedreno/freedreno_draw.c @@ -226,7 +226,7 @@ batch_draw_tracking(struct fd_batch *batch, const struct pipe_draw_info *info, static void update_draw_stats(struct fd_context *ctx, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) assert_dt { ctx->stats.draw_calls++; @@ -266,7 +266,7 @@ update_draw_stats(struct fd_context *ctx, const struct pipe_draw_info *info, static void fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, unsigned num_draws) in_dt + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) in_dt { struct fd_context *ctx = fd_context(pctx); diff --git a/src/gallium/drivers/freedreno/freedreno_draw.h b/src/gallium/drivers/freedreno/freedreno_draw.h index 02c1e49..28ffce0 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.h +++ b/src/gallium/drivers/freedreno/freedreno_draw.h @@ -143,7 +143,7 @@ static inline void fd_draw_emit(struct fd_batch *batch, struct fd_ringbuffer *ring, enum pc_di_primtype primtype, enum pc_di_vis_cull_mode vismode, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, unsigned index_offset) + const struct pipe_draw_start_count_bias *draw, unsigned index_offset) { struct pipe_resource *idx_buffer = NULL; enum pc_di_index_size idx_type = INDEX_SIZE_IGN; diff --git a/src/gallium/drivers/freedreno/ir3/ir3_const.h b/src/gallium/drivers/freedreno/ir3/ir3_const.h index d01b036..d02fe07 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_const.h +++ b/src/gallium/drivers/freedreno/ir3/ir3_const.h @@ -466,7 +466,7 @@ ir3_emit_vs_driver_params(const struct ir3_shader_variant *v, struct fd_ringbuffer *ring, struct fd_context *ctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw) assert_dt + const struct pipe_draw_start_count_bias *draw) assert_dt { assert(v->need_driver_params); @@ -548,7 +548,7 @@ ir3_emit_vs_consts(const struct ir3_shader_variant *v, struct fd_ringbuffer *ring, struct fd_context *ctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw) assert_dt + const struct pipe_draw_start_count_bias *draw) assert_dt { debug_assert(v->type == MESA_SHADER_VERTEX); diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c index 48506df..6ed154d 100644 --- a/src/gallium/drivers/i915/i915_context.c +++ b/src/gallium/drivers/i915/i915_context.c @@ -54,7 +54,7 @@ DEBUG_GET_ONCE_BOOL_OPTION(i915_no_vbuf, "I915_NO_VBUF", FALSE) static void i915_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index 141d557..c1348b9 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -855,7 +855,7 @@ void iris_copy_region(struct blorp_context *blorp, void iris_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); void iris_launch_grid(struct pipe_context *, const struct pipe_grid_info *); diff --git a/src/gallium/drivers/iris/iris_draw.c b/src/gallium/drivers/iris/iris_draw.c index ab8d754..ef5c29d 100644 --- a/src/gallium/drivers/iris/iris_draw.c +++ b/src/gallium/drivers/iris/iris_draw.c @@ -117,7 +117,7 @@ static void iris_update_draw_parameters(struct iris_context *ice, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { bool changed = false; @@ -179,7 +179,7 @@ static void iris_indirect_draw_vbo(struct iris_context *ice, const struct pipe_draw_info *dinfo, const struct pipe_draw_indirect_info *dindirect, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { struct iris_batch *batch = &ice->batches[IRIS_BATCH_RENDER]; struct pipe_draw_info info = *dinfo; @@ -224,7 +224,7 @@ static void iris_simple_draw_vbo(struct iris_context *ice, const struct pipe_draw_info *draw, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *sc) + const struct pipe_draw_start_count_bias *sc) { struct iris_batch *batch = &ice->batches[IRIS_BATCH_RENDER]; @@ -241,7 +241,7 @@ iris_simple_draw_vbo(struct iris_context *ice, void iris_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { diff --git a/src/gallium/drivers/iris/iris_measure.c b/src/gallium/drivers/iris/iris_measure.c index a0910f5..e6f836e 100644 --- a/src/gallium/drivers/iris/iris_measure.c +++ b/src/gallium/drivers/iris/iris_measure.c @@ -263,7 +263,7 @@ _iris_measure_snapshot(struct iris_context *ice, enum intel_measure_snapshot_type type, const struct pipe_draw_info *draw, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *sc) + const struct pipe_draw_start_count_bias *sc) { const struct intel_measure_config *config = config_from_context(ice); diff --git a/src/gallium/drivers/iris/iris_measure.h b/src/gallium/drivers/iris/iris_measure.h index 4413558..8e2f181 100644 --- a/src/gallium/drivers/iris/iris_measure.h +++ b/src/gallium/drivers/iris/iris_measure.h @@ -46,7 +46,7 @@ void _iris_measure_snapshot(struct iris_context *ice, enum intel_measure_snapshot_type type, const struct pipe_draw_info *draw, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *sc); + const struct pipe_draw_start_count_bias *sc); #define iris_measure_snapshot(ice, batch, type, draw, indirect, start_count) \ if (unlikely(((struct iris_screen *) ice->ctx.screen)->measure.config)) \ diff --git a/src/gallium/drivers/iris/iris_screen.h b/src/gallium/drivers/iris/iris_screen.h index 25375c0..1cee7da 100644 --- a/src/gallium/drivers/iris/iris_screen.h +++ b/src/gallium/drivers/iris/iris_screen.h @@ -63,7 +63,7 @@ struct iris_vtable { struct iris_batch *batch, const struct pipe_draw_info *draw, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *sc); + const struct pipe_draw_start_count_bias *sc); void (*update_surface_base_address)(struct iris_batch *batch, struct iris_binder *binder); void (*upload_compute_state)(struct iris_context *ice, diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index c5d376c..60211f9 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -6570,7 +6570,7 @@ iris_upload_render_state(struct iris_context *ice, struct iris_batch *batch, const struct pipe_draw_info *draw, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *sc) + const struct pipe_draw_start_count_bias *sc) { bool use_predicate = ice->state.predicate == IRIS_PREDICATE_STATE_USE_BIT; diff --git a/src/gallium/drivers/lima/lima_draw.c b/src/gallium/drivers/lima/lima_draw.c index fc218ee..3abee78 100644 --- a/src/gallium/drivers/lima/lima_draw.c +++ b/src/gallium/drivers/lima/lima_draw.c @@ -267,7 +267,7 @@ lima_pipe_format_to_attrib_type(enum pipe_format format) static void lima_pack_vs_cmd(struct lima_context *ctx, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { struct lima_context_constant_buffer *ccb = ctx->const_buffer + PIPE_SHADER_VERTEX; @@ -316,7 +316,7 @@ lima_pack_vs_cmd(struct lima_context *ctx, const struct pipe_draw_info *info, static void lima_pack_plbu_cmd(struct lima_context *ctx, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { struct lima_vs_compiled_shader *vs = ctx->vs; struct pipe_scissor_state *cscissor = &ctx->clipped_scissor; @@ -808,7 +808,7 @@ lima_pack_render_state(struct lima_context *ctx, const struct pipe_draw_info *in static void lima_update_gp_attribute_info(struct lima_context *ctx, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { struct lima_job *job = lima_job_get(ctx); struct lima_vertex_element_state *ve = ctx->vertex_elements; @@ -924,7 +924,7 @@ lima_update_pp_uniform(struct lima_context *ctx) static void lima_update_varying(struct lima_context *ctx, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { struct lima_job *job = lima_job_get(ctx); struct lima_screen *screen = lima_screen(ctx->base.screen); @@ -1009,7 +1009,7 @@ lima_update_varying(struct lima_context *ctx, const struct pipe_draw_info *info, static void lima_draw_vbo_update(struct pipe_context *pctx, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { struct lima_context *ctx = lima_context(pctx); struct lima_context_framebuffer *fb = &ctx->framebuffer; @@ -1064,7 +1064,7 @@ lima_draw_vbo_update(struct pipe_context *pctx, static void lima_draw_vbo_indexed(struct pipe_context *pctx, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { struct lima_context *ctx = lima_context(pctx); struct lima_job *job = lima_job_get(ctx); @@ -1108,11 +1108,11 @@ lima_draw_vbo_indexed(struct pipe_context *pctx, static void lima_draw_vbo_count(struct pipe_context *pctx, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { static const uint32_t max_verts = 65535; - struct pipe_draw_start_count local_draw = *draw; + struct pipe_draw_start_count_bias local_draw = *draw; unsigned start = draw->start; unsigned count = draw->count; @@ -1136,7 +1136,7 @@ static void lima_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { diff --git a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c index e8f0ae6..2fb8733 100644 --- a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c +++ b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c @@ -53,7 +53,7 @@ static void llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (!indirect && (!draws[0].count || !info->instance_count)) diff --git a/src/gallium/drivers/nouveau/nv30/nv30_context.h b/src/gallium/drivers/nouveau/nv30/nv30_context.h index 0fea91d..1f1ad58 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_context.h +++ b/src/gallium/drivers/nouveau/nv30/nv30_context.h @@ -196,14 +196,14 @@ nv30_fragtex_set_sampler_views(struct pipe_context *pipe, void nv30_push_vbo(struct nv30_context *nv30, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw); + const struct pipe_draw_start_count_bias *draw); void nv30_draw_init(struct pipe_context *pipe); void nv30_render_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw); + const struct pipe_draw_start_count_bias *draw); bool nv30_state_validate(struct nv30_context *nv30, uint32_t mask, bool hwtnl); diff --git a/src/gallium/drivers/nouveau/nv30/nv30_draw.c b/src/gallium/drivers/nouveau/nv30/nv30_draw.c index f9b8677..1c4f2b8 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_draw.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_draw.c @@ -377,7 +377,7 @@ nv30_render_validate(struct nv30_context *nv30) void nv30_render_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw_one) + const struct pipe_draw_start_count_bias *draw_one) { struct nv30_context *nv30 = nv30_context(pipe); struct draw_context *draw = nv30->draw; diff --git a/src/gallium/drivers/nouveau/nv30/nv30_push.c b/src/gallium/drivers/nouveau/nv30/nv30_push.c index 870e40d..33ed47a 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_push.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_push.c @@ -196,7 +196,7 @@ emit_vertices_seq(struct push_context *ctx, unsigned start, unsigned count) void nv30_push_vbo(struct nv30_context *nv30, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { struct push_context ctx; unsigned i, index_size; diff --git a/src/gallium/drivers/nouveau/nv30/nv30_vbo.c b/src/gallium/drivers/nouveau/nv30/nv30_vbo.c index 67479e6..892eeb6 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_vbo.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_vbo.c @@ -547,7 +547,7 @@ nv30_draw_elements(struct nv30_context *nv30, bool shorten, static void nv30_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.h b/src/gallium/drivers/nouveau/nv50/nv50_context.h index 728cdbd..7b67c67 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_context.h +++ b/src/gallium/drivers/nouveau/nv50/nv50_context.h @@ -328,7 +328,7 @@ nv50_cb_push(struct nouveau_context *nv, /* nv50_vbo.c */ void nv50_draw_vbo(struct pipe_context *, const struct pipe_draw_info *, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); void * @@ -343,7 +343,7 @@ void nv50_vertex_arrays_validate(struct nv50_context *nv50); /* nv50_push.c */ void nv50_push_vbo(struct nv50_context *, const struct pipe_draw_info *, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw); + const struct pipe_draw_start_count_bias *draw); /* nv84_video.c */ struct pipe_video_codec * diff --git a/src/gallium/drivers/nouveau/nv50/nv50_push.c b/src/gallium/drivers/nouveau/nv50/nv50_push.c index 4af068e..e7709c2 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_push.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_push.c @@ -240,7 +240,7 @@ nv50_prim_gl(unsigned prim) void nv50_push_vbo(struct nv50_context *nv50, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { struct push_context ctx; unsigned i, index_size; diff --git a/src/gallium/drivers/nouveau/nv50/nv50_vbo.c b/src/gallium/drivers/nouveau/nv50/nv50_vbo.c index fd2c6e1..ed8c131 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_vbo.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_vbo.c @@ -759,7 +759,7 @@ nv50_draw_vbo_kick_notify(struct nouveau_pushbuf *chan) void nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h index 724c14c..456ab2e 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h @@ -414,7 +414,7 @@ nvc0_cb_bo_push(struct nouveau_context *, /* nvc0_vbo.c */ void nvc0_draw_vbo(struct pipe_context *, const struct pipe_draw_info *, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); void * @@ -440,10 +440,10 @@ nvc0_video_buffer_create(struct pipe_context *pipe, /* nvc0_push.c */ void nvc0_push_vbo(struct nvc0_context *, const struct pipe_draw_info *, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw); + const struct pipe_draw_start_count_bias *draw); void nvc0_push_vbo_indirect(struct nvc0_context *, const struct pipe_draw_info *, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw); + const struct pipe_draw_start_count_bias *draw); /* nve4_compute.c */ void nve4_launch_grid(struct pipe_context *, const struct pipe_grid_info *); diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c index d0d109b..1e89015 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c @@ -925,7 +925,7 @@ nvc0_update_prim_restart(struct nvc0_context *nvc0, bool en, uint32_t index) void nvc0_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo_translate.c b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo_translate.c index 2be35e9..badb594 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo_translate.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo_translate.c @@ -37,7 +37,7 @@ struct push_context { static void nvc0_push_upload_vertex_ids(struct push_context *, struct nvc0_context *, const struct pipe_draw_info *, - const struct pipe_draw_start_count *draw); + const struct pipe_draw_start_count_bias *draw); static void nvc0_push_context_init(struct nvc0_context *nvc0, struct push_context *ctx) @@ -493,7 +493,7 @@ typedef struct { void nvc0_push_vbo_indirect(struct nvc0_context *nvc0, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { /* The strategy here is to just read the commands from the indirect buffer * and do the draws. This is suboptimal, but will only happen in the case @@ -516,7 +516,7 @@ nvc0_push_vbo_indirect(struct nvc0_context *nvc0, const struct pipe_draw_info *i uint8_t *buf_data = nouveau_resource_map_offset( &nvc0->base, buf, indirect->offset, NOUVEAU_BO_RD); struct pipe_draw_info single = *info; - struct pipe_draw_start_count sdraw = *draw; + struct pipe_draw_start_count_bias sdraw = *draw; for (i = 0; i < draw_count; i++, buf_data += indirect->stride) { if (info->index_size) { DrawElementsIndirectCommand *cmd = (void *)buf_data; @@ -557,7 +557,7 @@ nvc0_push_vbo_indirect(struct nvc0_context *nvc0, const struct pipe_draw_info *i void nvc0_push_vbo(struct nvc0_context *nvc0, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { struct push_context ctx; unsigned i, index_size; @@ -711,7 +711,7 @@ static void nvc0_push_upload_vertex_ids(struct push_context *ctx, struct nvc0_context *nvc0, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { struct nouveau_pushbuf *push = ctx->push; diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 610b787..5d5aeca 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -63,7 +63,7 @@ panfrost_bo_access_for_stage(enum pipe_shader_type stage) mali_ptr panfrost_get_index_buffer_bounded(struct panfrost_context *ctx, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, unsigned *min_index, unsigned *max_index) { struct panfrost_resource *rsrc = pan_resource(info->index.resource); diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.h b/src/gallium/drivers/panfrost/pan_cmdstream.h index 1ec048f..b09c427 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.h +++ b/src/gallium/drivers/panfrost/pan_cmdstream.h @@ -73,7 +73,7 @@ panfrost_emit_vertex_data(struct panfrost_batch *batch, mali_ptr panfrost_get_index_buffer_bounded(struct panfrost_context *ctx, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, unsigned *min_index, unsigned *max_index); void diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 22b68c2..30c4f13 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -173,7 +173,7 @@ static void panfrost_statistics_record( struct panfrost_context *ctx, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { if (!ctx->active_queries) return; @@ -288,7 +288,7 @@ panfrost_is_implicit_prim_restart(const struct pipe_draw_info *info) static void panfrost_draw_emit_tiler(struct panfrost_batch *batch, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, void *invocation_template, mali_ptr shared_mem, mali_ptr indices, mali_ptr fs_vary, mali_ptr varyings, @@ -408,7 +408,7 @@ panfrost_draw_emit_tiler(struct panfrost_batch *batch, static void panfrost_direct_draw(struct panfrost_context *ctx, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { if (!draw->count || !info->instance_count) return; @@ -536,10 +536,10 @@ static void panfrost_indirect_draw(struct panfrost_context *ctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { if (indirect->count_from_stream_output) { - struct pipe_draw_start_count tmp_draw = *draw; + struct pipe_draw_start_count_bias tmp_draw = *draw; struct panfrost_streamout_target *so = pan_so_target(indirect->count_from_stream_output); @@ -689,7 +689,7 @@ static void panfrost_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { struct panfrost_context *ctx = pan_context(pipe); diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index d401853..3fc0608 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -335,7 +335,7 @@ static boolean immd_is_good_idea(struct r300_context *r300, static void r300_draw_arrays_immediate(struct r300_context *r300, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { struct pipe_vertex_element* velem; struct pipe_vertex_buffer* vbuf; @@ -499,7 +499,7 @@ static void r300_emit_draw_elements(struct r300_context *r300, static void r300_draw_elements_immediate(struct r300_context *r300, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { const uint8_t *ptr1; const uint16_t *ptr2; @@ -585,7 +585,7 @@ static void r300_draw_elements_immediate(struct r300_context *r300, static void r300_draw_elements(struct r300_context *r300, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, int instance_id) { struct pipe_resource *indexBuffer = @@ -677,7 +677,7 @@ done: static void r300_draw_arrays(struct r300_context *r300, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, int instance_id) { boolean alt_num_verts = r300->screen->caps.is_r500 && @@ -719,7 +719,7 @@ static void r300_draw_arrays(struct r300_context *r300, static void r300_draw_arrays_instanced(struct r300_context *r300, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { int i; @@ -729,7 +729,7 @@ static void r300_draw_arrays_instanced(struct r300_context *r300, static void r300_draw_elements_instanced(struct r300_context *r300, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { int i; @@ -789,7 +789,7 @@ static unsigned r300_max_vertex_count(struct r300_context *r300) static void r300_draw_vbo(struct pipe_context* pipe, const struct pipe_draw_info *dinfo, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { @@ -799,7 +799,7 @@ static void r300_draw_vbo(struct pipe_context* pipe, struct r300_context* r300 = r300_context(pipe); struct pipe_draw_info info = *dinfo; - struct pipe_draw_start_count draw = draws[0]; + struct pipe_draw_start_count_bias draw = draws[0]; if (r300->skip_rendering || !u_trim_pipe_prim(info.mode, &draw.count)) { @@ -856,7 +856,7 @@ static void r300_draw_vbo(struct pipe_context* pipe, static void r300_swtcl_draw_vbo(struct pipe_context* pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { @@ -865,7 +865,7 @@ static void r300_swtcl_draw_vbo(struct pipe_context* pipe, } struct r300_context* r300 = r300_context(pipe); - struct pipe_draw_start_count draw = draws[0]; + struct pipe_draw_start_count_bias draw = draws[0]; if (r300->skip_rendering) { return; diff --git a/src/gallium/drivers/r300/r300_render_stencilref.c b/src/gallium/drivers/r300/r300_render_stencilref.c index 5135ce7..d18f6cc 100644 --- a/src/gallium/drivers/r300/r300_render_stencilref.c +++ b/src/gallium/drivers/r300/r300_render_stencilref.c @@ -37,7 +37,7 @@ struct r300_stencilref_context { void (*draw_vbo)(struct pipe_context *pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); uint32_t rs_cull_mode; @@ -106,7 +106,7 @@ static void r300_stencilref_end(struct r300_context *r300) static void r300_stencilref_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { struct r300_context *r300 = r300_context(pipe); diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 89a21c9..17cd65c 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -2075,7 +2075,7 @@ static inline void r600_emit_rasterizer_prim_state(struct r600_context *rctx) static void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { diff --git a/src/gallium/drivers/radeonsi/si_compute_prim_discard.c b/src/gallium/drivers/radeonsi/si_compute_prim_discard.c index 04825f2..7a4f423 100644 --- a/src/gallium/drivers/radeonsi/si_compute_prim_discard.c +++ b/src/gallium/drivers/radeonsi/si_compute_prim_discard.c @@ -954,7 +954,7 @@ static bool si_check_ring_space(struct si_context *sctx, unsigned out_indexbuf_s enum si_prim_discard_outcome si_prepare_prim_discard_or_split_draw(struct si_context *sctx, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws, bool primitive_restart, unsigned total_count) { @@ -1023,7 +1023,7 @@ si_prepare_prim_discard_or_split_draw(struct si_context *sctx, const struct pipe /* Split single draws if splitting multi draws isn't enough. */ struct pipe_draw_info split_draw = *info; - struct pipe_draw_start_count split_draw_range = draws[0]; + struct pipe_draw_start_count_bias split_draw_range = draws[0]; unsigned base_start = split_draw_range.start; split_draw.primitive_restart = primitive_restart; diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index da31613..8fed716 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -887,7 +887,7 @@ struct si_small_prim_cull_info { typedef void (*pipe_draw_vbo_func)(struct pipe_context *pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); struct si_context { @@ -1481,7 +1481,7 @@ enum si_prim_discard_outcome void si_build_prim_discard_compute_shader(struct si_shader_context *ctx); enum si_prim_discard_outcome si_prepare_prim_discard_or_split_draw(struct si_context *sctx, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws, bool primitive_restart, unsigned total_count); void si_compute_signal_gfx(struct si_context *sctx); diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index c54f14d..3a26dc6 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -964,7 +964,7 @@ static void si_emit_draw_registers(struct si_context *sctx, template static void si_emit_draw_packets(struct si_context *sctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws, struct pipe_resource *indexbuf, unsigned index_size, unsigned index_offset, unsigned instance_count, @@ -1454,7 +1454,7 @@ static bool si_upload_and_prefetch_VB_descriptors(struct si_context *sctx) static void si_get_draw_start_count(struct si_context *sctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws, unsigned *start, unsigned *count) { if (indirect && !indirect->count_from_stream_output) { @@ -1668,7 +1668,7 @@ template bind_vs_state(pipe, si_get_blitter_vs(sctx, type, num_instances)); struct pipe_draw_info info = {}; - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; info.mode = SI_PRIM_RECTANGLE_LIST; info.instance_count = num_instances; @@ -2311,7 +2311,7 @@ static void si_init_draw_vbo_all_families(struct si_context *sctx) static void si_invalid_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { unreachable("vertex shader not bound"); diff --git a/src/gallium/drivers/softpipe/sp_draw_arrays.c b/src/gallium/drivers/softpipe/sp_draw_arrays.c index c02bdaf..3b2a7d6 100644 --- a/src/gallium/drivers/softpipe/sp_draw_arrays.c +++ b/src/gallium/drivers/softpipe/sp_draw_arrays.c @@ -61,7 +61,7 @@ void softpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { diff --git a/src/gallium/drivers/softpipe/sp_state.h b/src/gallium/drivers/softpipe/sp_state.h index 3971bbf..9e72592 100644 --- a/src/gallium/drivers/softpipe/sp_state.h +++ b/src/gallium/drivers/softpipe/sp_state.h @@ -183,7 +183,7 @@ void softpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); void diff --git a/src/gallium/drivers/svga/svga_draw.h b/src/gallium/drivers/svga/svga_draw.h index a353f6a..375c721 100644 --- a/src/gallium/drivers/svga/svga_draw.h +++ b/src/gallium/drivers/svga/svga_draw.h @@ -66,7 +66,7 @@ svga_hwtnl_draw_arrays(struct svga_hwtnl *hwtnl, enum pipe_error svga_hwtnl_draw_range_elements(struct svga_hwtnl *hwtnl, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, unsigned count); boolean diff --git a/src/gallium/drivers/svga/svga_draw_elements.c b/src/gallium/drivers/svga/svga_draw_elements.c index 9987cef..b5ac35e 100644 --- a/src/gallium/drivers/svga/svga_draw_elements.c +++ b/src/gallium/drivers/svga/svga_draw_elements.c @@ -61,7 +61,7 @@ static enum pipe_error translate_indices(struct svga_hwtnl *hwtnl, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, enum pipe_prim_type gen_prim, unsigned orig_nr, unsigned gen_nr, unsigned gen_size, @@ -216,7 +216,7 @@ svga_hwtnl_simple_draw_range_elements(struct svga_hwtnl *hwtnl, enum pipe_error svga_hwtnl_draw_range_elements(struct svga_hwtnl *hwtnl, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, unsigned count) { struct pipe_context *pipe = &hwtnl->svga->pipe; diff --git a/src/gallium/drivers/svga/svga_pipe_draw.c b/src/gallium/drivers/svga/svga_pipe_draw.c index 8d7ff41..c943c03 100644 --- a/src/gallium/drivers/svga/svga_pipe_draw.c +++ b/src/gallium/drivers/svga/svga_pipe_draw.c @@ -45,7 +45,7 @@ static enum pipe_error retry_draw_range_elements(struct svga_context *svga, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw, + const struct pipe_draw_start_count_bias *draw, unsigned count) { SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_DRAWELEMENTS); @@ -219,7 +219,7 @@ get_vcount_from_stream_output(struct svga_context *svga, static void svga_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { diff --git a/src/gallium/drivers/svga/svga_swtnl.h b/src/gallium/drivers/svga/svga_swtnl.h index 8712b40..704a6e7 100644 --- a/src/gallium/drivers/svga/svga_swtnl.h +++ b/src/gallium/drivers/svga/svga_swtnl.h @@ -41,7 +41,7 @@ enum pipe_error svga_swtnl_draw_vbo(struct svga_context *svga, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw); + const struct pipe_draw_start_count_bias *draw); #endif diff --git a/src/gallium/drivers/svga/svga_swtnl_backend.c b/src/gallium/drivers/svga/svga_swtnl_backend.c index 53ca583..c0e7266 100644 --- a/src/gallium/drivers/svga/svga_swtnl_backend.c +++ b/src/gallium/drivers/svga/svga_swtnl_backend.c @@ -334,7 +334,7 @@ svga_vbuf_render_draw_elements(struct vbuf_render *render, .min_index = svga_render->min_index, .max_index = svga_render->max_index, }; - const struct pipe_draw_start_count draw = { + const struct pipe_draw_start_count_bias draw = { .start = 0, .count = nr_indices, }; diff --git a/src/gallium/drivers/svga/svga_swtnl_draw.c b/src/gallium/drivers/svga/svga_swtnl_draw.c index 30761d1..a5cc6f6 100644 --- a/src/gallium/drivers/svga/svga_swtnl_draw.c +++ b/src/gallium/drivers/svga/svga_swtnl_draw.c @@ -40,7 +40,7 @@ enum pipe_error svga_swtnl_draw_vbo(struct svga_context *svga, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw_one) + const struct pipe_draw_start_count_bias *draw_one) { struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS] = { 0 }; struct pipe_transfer *ib_transfer = NULL; diff --git a/src/gallium/drivers/swr/swr_draw.cpp b/src/gallium/drivers/swr/swr_draw.cpp index eada9a2..fb8bbd4 100644 --- a/src/gallium/drivers/swr/swr_draw.cpp +++ b/src/gallium/drivers/swr/swr_draw.cpp @@ -39,7 +39,7 @@ static void swr_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { @@ -82,7 +82,7 @@ swr_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, swr_update_draw_context(ctx); struct pipe_draw_info resolved_info; - struct pipe_draw_start_count resolved_draw; + struct pipe_draw_start_count_bias resolved_draw; /* DrawTransformFeedback */ if (indirect && indirect->count_from_stream_output) { // trick copied from softpipe to modify const struct *info diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp index 1a93edc..5ee24b5 100644 --- a/src/gallium/drivers/swr/swr_state.cpp +++ b/src/gallium/drivers/swr/swr_state.cpp @@ -1168,7 +1168,7 @@ swr_get_last_fe(const struct swr_context *ctx) void swr_update_derived(struct pipe_context *pipe, const struct pipe_draw_info *p_draw_info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { struct swr_context *ctx = swr_context(pipe); struct swr_screen *screen = swr_screen(pipe->screen); diff --git a/src/gallium/drivers/swr/swr_state.h b/src/gallium/drivers/swr/swr_state.h index 50dad0b..75a70de 100644 --- a/src/gallium/drivers/swr/swr_state.h +++ b/src/gallium/drivers/swr/swr_state.h @@ -131,7 +131,7 @@ struct swr_derived_state { void swr_update_derived(struct pipe_context *, const struct pipe_draw_info * = nullptr, - const struct pipe_draw_start_count *draw = nullptr); + const struct pipe_draw_start_count_bias *draw = nullptr); /* * Conversion functions: Convert mesa state defines to SWR. diff --git a/src/gallium/drivers/tegra/tegra_context.c b/src/gallium/drivers/tegra/tegra_context.c index ae1f3bf..b31ce85 100644 --- a/src/gallium/drivers/tegra/tegra_context.c +++ b/src/gallium/drivers/tegra/tegra_context.c @@ -49,7 +49,7 @@ static void tegra_draw_vbo(struct pipe_context *pcontext, const struct pipe_draw_info *pinfo, const struct pipe_draw_indirect_info *pindirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c index 6660a70..8b5eed4 100644 --- a/src/gallium/drivers/v3d/v3dx_draw.c +++ b/src/gallium/drivers/v3d/v3dx_draw.c @@ -997,7 +997,7 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d, static void v3d_update_primitives_generated_counter(struct v3d_context *v3d, const struct pipe_draw_info *info, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { assert(!v3d->prog.gs); @@ -1106,7 +1106,7 @@ v3d_check_compiled_shaders(struct v3d_context *v3d) static void v3d_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { diff --git a/src/gallium/drivers/vc4/vc4_draw.c b/src/gallium/drivers/vc4/vc4_draw.c index 77e7159..dfe2c35 100644 --- a/src/gallium/drivers/vc4/vc4_draw.c +++ b/src/gallium/drivers/vc4/vc4_draw.c @@ -290,7 +290,7 @@ vc4_hw_2116_workaround(struct pipe_context *pctx, int vert_count) static void vc4_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c index 17afd77..afd8f58 100644 --- a/src/gallium/drivers/virgl/virgl_context.c +++ b/src/gallium/drivers/virgl/virgl_context.c @@ -861,7 +861,7 @@ static void virgl_clear_texture(struct pipe_context *ctx, static void virgl_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *dinfo, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (num_draws > 1) { diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c index 50156ad..214d384 100644 --- a/src/gallium/drivers/virgl/virgl_encode.c +++ b/src/gallium/drivers/virgl/virgl_encode.c @@ -739,7 +739,7 @@ int virgl_encoder_set_index_buffer(struct virgl_context *ctx, int virgl_encoder_draw_vbo(struct virgl_context *ctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw) + const struct pipe_draw_start_count_bias *draw) { uint32_t length = VIRGL_DRAW_VBO_SIZE; if (info->mode == PIPE_PRIM_PATCHES) diff --git a/src/gallium/drivers/virgl/virgl_encode.h b/src/gallium/drivers/virgl/virgl_encode.h index ee782d9..20af94d 100644 --- a/src/gallium/drivers/virgl/virgl_encode.h +++ b/src/gallium/drivers/virgl/virgl_encode.h @@ -137,7 +137,7 @@ int virgl_encoder_set_viewport_states(struct virgl_context *ctx, int virgl_encoder_draw_vbo(struct virgl_context *ctx, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draw); + const struct pipe_draw_start_count_bias *draw); int virgl_encoder_create_surface(struct virgl_context *ctx, diff --git a/src/gallium/drivers/zink/zink_context.h b/src/gallium/drivers/zink/zink_context.h index e4de644..ed5efe0 100644 --- a/src/gallium/drivers/zink/zink_context.h +++ b/src/gallium/drivers/zink/zink_context.h @@ -335,7 +335,7 @@ void zink_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *dinfo, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); void diff --git a/src/gallium/drivers/zink/zink_draw.c b/src/gallium/drivers/zink/zink_draw.c index 8fc31b1..e457e66 100644 --- a/src/gallium/drivers/zink/zink_draw.c +++ b/src/gallium/drivers/zink/zink_draw.c @@ -283,7 +283,7 @@ void zink_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *dinfo, const struct pipe_draw_indirect_info *dindirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (!dindirect && (!draws[0].count || !dinfo->instance_count)) diff --git a/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c b/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c index 3f29b76..9fc757f 100644 --- a/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c +++ b/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c @@ -484,7 +484,7 @@ VKAPI_ATTR void VKAPI_CALL lvp_CmdDraw( LVP_FROM_HANDLE(lvp_cmd_buffer, cmd_buffer, commandBuffer); struct lvp_cmd_buffer_entry *cmd; - uint32_t cmd_size = sizeof(struct pipe_draw_start_count); + uint32_t cmd_size = sizeof(struct pipe_draw_start_count_bias); cmd = cmd_buf_entry_alloc_size(cmd_buffer, cmd_size, LVP_CMD_DRAW); if (!cmd) return; @@ -736,7 +736,7 @@ VKAPI_ATTR void VKAPI_CALL lvp_CmdDrawIndexed( LVP_FROM_HANDLE(lvp_cmd_buffer, cmd_buffer, commandBuffer); struct lvp_cmd_buffer_entry *cmd; - uint32_t cmd_size = sizeof(struct pipe_draw_start_count); + uint32_t cmd_size = sizeof(struct pipe_draw_start_count_bias); cmd = cmd_buf_entry_alloc_size(cmd_buffer, cmd_size, LVP_CMD_DRAW_INDEXED); if (!cmd) return; diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c index b335f66..76470b3 100644 --- a/src/gallium/frontends/lavapipe/lvp_execute.c +++ b/src/gallium/frontends/lavapipe/lvp_execute.c @@ -2158,7 +2158,7 @@ static void handle_draw_indirect(struct lvp_cmd_buffer_entry *cmd, struct rendering_state *state, bool indexed) { const struct lvp_subpass *subpass = &state->pass->subpasses[state->subpass]; - struct pipe_draw_start_count draw = {0}; + struct pipe_draw_start_count_bias draw = {0}; if (indexed) { state->info.index_bounds_valid = false; state->info.index_size = state->index_size; @@ -2629,7 +2629,7 @@ static void handle_draw_indirect_count(struct lvp_cmd_buffer_entry *cmd, struct rendering_state *state, bool indexed) { const struct lvp_subpass *subpass = &state->pass->subpasses[state->subpass]; - struct pipe_draw_start_count draw = {0}; + struct pipe_draw_start_count_bias draw = {0}; if (indexed) { state->info.index_bounds_valid = false; state->info.index_size = state->index_size; @@ -2806,7 +2806,7 @@ static void handle_draw_indirect_byte_count(struct lvp_cmd_buffer_entry *cmd, { struct lvp_cmd_draw_indirect_byte_count *dibc = &cmd->u.draw_indirect_byte_count; const struct lvp_subpass *subpass = &state->pass->subpasses[state->subpass]; - struct pipe_draw_start_count draw = {0}; + struct pipe_draw_start_count_bias draw = {0}; pipe_buffer_read(state->pctx, dibc->counter_buffer->bo, diff --git a/src/gallium/frontends/lavapipe/lvp_private.h b/src/gallium/frontends/lavapipe/lvp_private.h index 4404505..4c61ae8 100644 --- a/src/gallium/frontends/lavapipe/lvp_private.h +++ b/src/gallium/frontends/lavapipe/lvp_private.h @@ -743,7 +743,7 @@ struct lvp_cmd_draw { uint32_t instance_count; uint32_t first_instance; uint32_t draw_count; - struct pipe_draw_start_count draws[0]; + struct pipe_draw_start_count_bias draws[0]; }; struct lvp_cmd_draw_indexed { @@ -752,7 +752,7 @@ struct lvp_cmd_draw_indexed { uint32_t first_instance; bool calc_start; uint32_t draw_count; - struct pipe_draw_start_count draws[0]; + struct pipe_draw_start_count_bias draws[0]; }; struct lvp_cmd_draw_indirect { diff --git a/src/gallium/frontends/nine/device9.c b/src/gallium/frontends/nine/device9.c index 527d40d..49d82bb 100644 --- a/src/gallium/frontends/nine/device9.c +++ b/src/gallium/frontends/nine/device9.c @@ -3220,7 +3220,7 @@ NineDevice9_ProcessVertices( struct NineDevice9 *This, struct pipe_stream_output_info so; struct pipe_stream_output_target *target; struct pipe_draw_info draw; - struct pipe_draw_start_count sc; + struct pipe_draw_start_count_bias sc; struct pipe_box box; bool programmable_vs = This->state.vs && !(This->state.vdecl && This->state.vdecl->position_t); unsigned offsets[1] = {0}; diff --git a/src/gallium/frontends/nine/nine_state.c b/src/gallium/frontends/nine/nine_state.c index a30887d..543ed11 100644 --- a/src/gallium/frontends/nine/nine_state.c +++ b/src/gallium/frontends/nine/nine_state.c @@ -2355,7 +2355,7 @@ CSMT_ITEM_NO_WAIT(nine_context_clear_fb, static inline void init_draw_info(struct pipe_draw_info *info, - struct pipe_draw_start_count *draw, + struct pipe_draw_start_count_bias *draw, struct NineDevice9 *dev, D3DPRIMITIVETYPE type, UINT count) { info->mode = d3dprimitivetype_to_pipe_prim(type); @@ -2376,7 +2376,7 @@ CSMT_ITEM_NO_WAIT(nine_context_draw_primitive, { struct nine_context *context = &device->context; struct pipe_draw_info info; - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; nine_update_state(device); @@ -2401,7 +2401,7 @@ CSMT_ITEM_NO_WAIT(nine_context_draw_indexed_primitive, { struct nine_context *context = &device->context; struct pipe_draw_info info; - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; nine_update_state(device); @@ -2431,7 +2431,7 @@ CSMT_ITEM_NO_WAIT(nine_context_draw_indexed_primitive_from_vtxbuf_idxbuf, { struct nine_context *context = &device->context; struct pipe_draw_info info; - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; nine_update_state(device); diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index 4ce0e56..6364223 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -50,7 +50,7 @@ struct pipe_depth_stencil_alpha_state; struct pipe_device_reset_callback; struct pipe_draw_info; struct pipe_draw_indirect_info; -struct pipe_draw_start_count; +struct pipe_draw_start_count_bias; struct pipe_grid_info; struct pipe_fence_handle; struct pipe_framebuffer_state; @@ -138,7 +138,7 @@ struct pipe_context { void (*draw_vbo)(struct pipe_context *pipe, const struct pipe_draw_info *info, const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); /*@}*/ diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index ec86837..5ecb060 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -734,9 +734,10 @@ struct pipe_draw_indirect_info struct pipe_stream_output_target *count_from_stream_output; }; -struct pipe_draw_start_count { +struct pipe_draw_start_count_bias { unsigned start; unsigned count; + int index_bias; /**< a bias to be added to each index */ }; /** diff --git a/src/gallium/tests/graw/tri-instanced.c b/src/gallium/tests/graw/tri-instanced.c index 8ddd266..2119468 100644 --- a/src/gallium/tests/graw/tri-instanced.c +++ b/src/gallium/tests/graw/tri-instanced.c @@ -192,7 +192,7 @@ static void draw( void ) { union pipe_color_union clear_color = { {1,0,1,1} }; struct pipe_draw_info info; - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; ctx->clear(ctx, PIPE_CLEAR_COLOR, NULL, &clear_color, 0, 0); diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 55e2daa..afaad3b 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -65,7 +65,7 @@ struct util_queue_monitoring; struct _mesa_prim; struct _mesa_index_buffer; struct pipe_draw_info; -struct pipe_draw_start_count; +struct pipe_draw_start_count_bias; /* GL_ARB_vertex_buffer_object */ /* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return @@ -581,7 +581,7 @@ struct dd_function_table { */ void (*DrawGallium)(struct gl_context *ctx, struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); /** @@ -600,7 +600,7 @@ struct dd_function_table { */ void (*DrawGalliumComplex)(struct gl_context *ctx, struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, const unsigned char *mode, const int *base_vertex, unsigned num_draws); diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c index d9442f1..75af188 100644 --- a/src/mesa/main/draw.c +++ b/src/mesa/main/draw.c @@ -936,7 +936,7 @@ _mesa_validate_MultiDrawElementsIndirectCount(struct gl_context *ctx, void _mesa_draw_gallium_fallback(struct gl_context *ctx, struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { struct _mesa_index_buffer ib; @@ -1066,7 +1066,7 @@ _mesa_draw_gallium_fallback(struct gl_context *ctx, void _mesa_draw_gallium_complex_fallback(struct gl_context *ctx, struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, const unsigned char *mode, const int *base_vertex, unsigned num_draws) @@ -1320,7 +1320,7 @@ _mesa_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start, * draws. */ struct pipe_draw_info info; - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; info.mode = mode; info.vertices_per_patch = ctx->TessCtrlProgram.patch_vertices; @@ -1647,7 +1647,7 @@ _mesa_MultiDrawArrays(GLenum mode, const GLint *first, return; struct pipe_draw_info info; - struct pipe_draw_start_count *draw; + struct pipe_draw_start_count_bias *draw; ALLOC_PRIMS(draw, primcount, "glMultiDrawElements"); @@ -1762,7 +1762,7 @@ _mesa_validated_drawrangeelements(struct gl_context *ctx, GLenum mode, } struct pipe_draw_info info; - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; unsigned index_size_shift = get_index_size_shift(type); struct gl_buffer_object *index_bo = ctx->Array.VAO->IndexBufferObj; @@ -2197,7 +2197,7 @@ _mesa_validated_multidrawelements(struct gl_context *ctx, GLenum mode, * greater than UINT32_MAX bytes. */ max_index_ptr - min_index_ptr <= UINT32_MAX)) { - struct pipe_draw_start_count *draw; + struct pipe_draw_start_count_bias *draw; ALLOC_PRIMS(draw, primcount, "glMultiDrawElements"); @@ -2228,7 +2228,7 @@ _mesa_validated_multidrawelements(struct gl_context *ctx, GLenum mode, info.increment_draw_id = false; for (int i = 0; i < primcount; i++) { - struct pipe_draw_start_count draw; + struct pipe_draw_start_count_bias draw; if (!count[i]) continue; diff --git a/src/mesa/main/draw.h b/src/mesa/main/draw.h index 11e8927..0fe0950 100644 --- a/src/mesa/main/draw.h +++ b/src/mesa/main/draw.h @@ -90,13 +90,13 @@ _mesa_set_draw_vao(struct gl_context *ctx, struct gl_vertex_array_object *vao, void _mesa_draw_gallium_fallback(struct gl_context *ctx, struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); void _mesa_draw_gallium_complex_fallback(struct gl_context *ctx, struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, const unsigned char *mode, const int *base_vertex, unsigned num_draws); diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index e3e4346..be9e375 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -133,7 +133,7 @@ prepare_indexed_draw(/* pass both st and ctx to reduce dereferences */ struct st_context *st, struct gl_context *ctx, struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { if (info->index_size) { @@ -173,7 +173,7 @@ prepare_indexed_draw(/* pass both st and ctx to reduce dereferences */ static void st_draw_gallium(struct gl_context *ctx, struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { struct st_context *st = st_context(ctx); @@ -189,7 +189,7 @@ st_draw_gallium(struct gl_context *ctx, static void st_draw_gallium_complex(struct gl_context *ctx, struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, const unsigned char *mode, const int *base_vertex, unsigned num_draws) @@ -281,7 +281,7 @@ st_indirect_draw_vbo(struct gl_context *ctx, struct st_context *st = st_context(ctx); struct pipe_draw_info info; struct pipe_draw_indirect_info indirect; - struct pipe_draw_start_count draw = {0}; + struct pipe_draw_start_count_bias draw = {0}; assert(stride); prepare_draw(st, ctx); @@ -339,7 +339,7 @@ st_draw_transform_feedback(struct gl_context *ctx, GLenum mode, struct st_context *st = st_context(ctx); struct pipe_draw_info info; struct pipe_draw_indirect_info indirect; - struct pipe_draw_start_count draw = {0}; + struct pipe_draw_start_count_bias draw = {0}; prepare_draw(st, ctx); diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c index 865527c..0764cc1 100644 --- a/src/mesa/state_tracker/st_draw_feedback.c +++ b/src/mesa/state_tracker/st_draw_feedback.c @@ -441,7 +441,7 @@ st_feedback_draw_vbo(struct gl_context *ctx, /* draw here */ for (i = 0; i < nr_prims; i++) { - struct pipe_draw_start_count d; + struct pipe_draw_start_count_bias d; d.count = prims[i].count; diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h index 23e9e84..efad2d8 100644 --- a/src/mesa/vbo/vbo.h +++ b/src/mesa/vbo/vbo.h @@ -45,7 +45,7 @@ extern "C" { struct gl_context; struct pipe_draw_info; -struct pipe_draw_start_count; +struct pipe_draw_start_count_bias; /** * Max number of primitives (number of glBegin/End pairs) per VBO. @@ -107,7 +107,7 @@ struct vbo_exec_context struct { /* Multi draw where the mode can vary between draws. */ struct pipe_draw_info info; - struct pipe_draw_start_count draw[VBO_MAX_PRIM]; + struct pipe_draw_start_count_bias draw[VBO_MAX_PRIM]; GLubyte mode[VBO_MAX_PRIM]; /**< primitive modes per draw */ struct vbo_markers markers[VBO_MAX_PRIM]; unsigned prim_count; @@ -257,7 +257,7 @@ vbo_get_minmax_indices(struct gl_context *ctx, const struct _mesa_prim *prim, bool vbo_get_minmax_indices_gallium(struct gl_context *ctx, struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws); const struct gl_array_attributes* diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index af42473..4f19dbe 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -83,7 +83,7 @@ vbo_exec_wrap_buffers(struct vbo_exec_context *exec) else { struct gl_context *ctx = gl_context_from_vbo_exec(exec); unsigned last = exec->vtx.prim_count - 1; - struct pipe_draw_start_count *last_draw = &exec->vtx.draw[last]; + struct pipe_draw_start_count_bias *last_draw = &exec->vtx.draw[last]; const bool last_begin = exec->vtx.markers[last].begin; GLuint last_count = 0; @@ -922,7 +922,7 @@ vbo_exec_End(void) if (exec->vtx.prim_count > 0) { /* close off current primitive */ unsigned last = exec->vtx.prim_count - 1; - struct pipe_draw_start_count *last_draw = &exec->vtx.draw[last]; + struct pipe_draw_start_count_bias *last_draw = &exec->vtx.draw[last]; unsigned count = exec->vtx.vert_count - last_draw->start; last_draw->count = count; diff --git a/src/mesa/vbo/vbo_minmax_index.c b/src/mesa/vbo/vbo_minmax_index.c index 94608a3..bae7b15 100644 --- a/src/mesa/vbo/vbo_minmax_index.c +++ b/src/mesa/vbo/vbo_minmax_index.c @@ -401,14 +401,14 @@ vbo_get_minmax_indices(struct gl_context *ctx, bool vbo_get_minmax_indices_gallium(struct gl_context *ctx, struct pipe_draw_info *info, - const struct pipe_draw_start_count *draws, + const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { info->min_index = ~0; info->max_index = 0; for (unsigned i = 0; i < num_draws; i++) { - struct pipe_draw_start_count draw = draws[i]; + struct pipe_draw_start_count_bias draw = draws[i]; /* Do combination if possible to reduce map/unmap count */ while ((i + 1 < num_draws) && diff --git a/src/mesa/vbo/vbo_save.h b/src/mesa/vbo/vbo_save.h index 131f6ac..0a0eaeb 100644 --- a/src/mesa/vbo/vbo_save.h +++ b/src/mesa/vbo/vbo_save.h @@ -72,7 +72,7 @@ struct vbo_save_vertex_list { struct _mesa_index_buffer ib; struct pipe_draw_info info; unsigned char *mode; - struct pipe_draw_start_count *start_count; + struct pipe_draw_start_count_bias *start_count; unsigned num_draws; } merged; diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 411c274..9b0d143 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -807,7 +807,7 @@ compile_vertex_list(struct gl_context *ctx) node->merged.info.index_size = 4; node->merged.info.instance_count = 1; node->merged.info.index.gl_bo = node->merged.ib.obj; - node->merged.start_count = malloc(merged_prim_count * sizeof(struct pipe_draw_start_count)); + node->merged.start_count = malloc(merged_prim_count * sizeof(struct pipe_draw_start_count_bias)); if (merged_prim_count == 1) { node->merged.info.mode = merged_prims[0].mode; node->merged.mode = NULL; -- 2.7.4