diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_draw.c b/src/gallium/drivers/freedreno/a2xx/fd2_draw.c index 098a775b8ba..5b683075f5d 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_draw.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_draw.c @@ -153,8 +153,8 @@ 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_indirect_info *indirect, + const struct pipe_draw_start_count *pdraw, unsigned index_offset) { if (!ctx->prog.fs || !ctx->prog.vs) diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c index a2c8c4e4266..c2c486993ef 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c @@ -124,8 +124,8 @@ fd3_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info, .vtx = &ctx->vtx, .prog = &ctx->prog, .info = info, - .indirect = indirect, - .draw = draw, + .indirect = indirect, + .draw = draw, .key = { .color_two_side = ctx->rasterizer->light_twoside, .vclamp_color = ctx->rasterizer->clamp_vertex_color, diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.h b/src/gallium/drivers/freedreno/a3xx/fd3_emit.h index 7e70cc58d1d..93e41e3d9de 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.h +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.h @@ -46,8 +46,8 @@ struct fd3_emit { const struct fd_vertex_state *vtx; const struct fd_program_stateobj *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_indirect_info *indirect; + const struct pipe_draw_start_count *draw; bool binning_pass; struct ir3_shader_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 96189f821fd..951e108d3db 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_draw.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_draw.c @@ -108,8 +108,8 @@ fd4_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info, .vtx = &ctx->vtx, .prog = &ctx->prog, .info = info, - .indirect = indirect, - .draw = draw, + .indirect = indirect, + .draw = draw, .key = { .color_two_side = ctx->rasterizer->light_twoside, .vclamp_color = ctx->rasterizer->clamp_vertex_color, diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_emit.h b/src/gallium/drivers/freedreno/a4xx/fd4_emit.h index 7cd275578a8..502f7b592fa 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_emit.h +++ b/src/gallium/drivers/freedreno/a4xx/fd4_emit.h @@ -45,8 +45,8 @@ struct fd4_emit { const struct fd_vertex_state *vtx; const struct fd_program_stateobj *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_indirect_info *indirect; + const struct pipe_draw_start_count *draw; bool binning_pass; struct ir3_shader_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 5a68d788a69..89b77052883 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_draw.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_draw.c @@ -103,8 +103,8 @@ fd5_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info, .vtx = &ctx->vtx, .prog = &ctx->prog, .info = info, - .indirect = indirect, - .draw = draw, + .indirect = indirect, + .draw = draw, .key = { .color_two_side = ctx->rasterizer->light_twoside, .vclamp_color = ctx->rasterizer->clamp_vertex_color, diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_emit.h b/src/gallium/drivers/freedreno/a5xx/fd5_emit.h index 8c6c53a09de..d76fc2967c6 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_emit.h +++ b/src/gallium/drivers/freedreno/a5xx/fd5_emit.h @@ -45,8 +45,8 @@ struct fd5_emit { const struct fd_vertex_state *vtx; const struct fd_program_stateobj *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_indirect_info *indirect; + const struct pipe_draw_start_count *draw; bool binning_pass; struct ir3_shader_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 756234a7aab..728dcdc66ba 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c @@ -71,7 +71,7 @@ static void draw_emit_indirect(struct fd_ringbuffer *ring, struct CP_DRAW_INDX_OFFSET_0 *draw0, const struct pipe_draw_info *info, - const struct pipe_draw_indirect_info *indirect, + const struct pipe_draw_indirect_info *indirect, unsigned index_offset) { struct fd_resource *ind = fd_resource(indirect->buffer); @@ -101,7 +101,7 @@ 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, + const struct pipe_draw_start_count *draw, unsigned index_offset) { if (info->index_size) { @@ -176,8 +176,8 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info, .ctx = ctx, .vtx = &ctx->vtx, .info = info, - .indirect = indirect, - .draw = draw, + .indirect = indirect, + .draw = draw, .key = { .vs = ctx->prog.vs, .gs = ctx->prog.gs, diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h index 2484ac21603..1b369114e58 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h @@ -86,8 +86,8 @@ struct fd6_emit { struct fd_context *ctx; 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_indirect_info *indirect; + const struct pipe_draw_start_count *draw; struct ir3_cache_key key; enum fd_dirty_3d_state dirty; diff --git a/src/gallium/drivers/freedreno/freedreno_blitter.c b/src/gallium/drivers/freedreno/freedreno_blitter.c index dcdef477dcc..54ea92b082c 100644 --- a/src/gallium/drivers/freedreno/freedreno_blitter.c +++ b/src/gallium/drivers/freedreno/freedreno_blitter.c @@ -238,13 +238,13 @@ fd_blitter_clear(struct pipe_context *pctx, unsigned buffers, struct pipe_draw_info info = { .mode = PIPE_PRIM_MAX, /* maps to DI_PT_RECTLIST */ - .index_bounds_valid = true, + .index_bounds_valid = true, .max_index = 1, .instance_count = MAX2(1, pfb->layers), }; - struct pipe_draw_start_count draw = { - .count = 2, - }; + struct pipe_draw_start_count draw = { + .count = 2, + }; pctx->draw_vbo(pctx, &info, NULL, &draw, 1); /* We expect that this should not have triggered a change in pfb: */ diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c index fb7524cda5c..5948f1cc3ac 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.c +++ b/src/gallium/drivers/freedreno/freedreno_draw.c @@ -235,18 +235,18 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info, unsigned num_draws) { if (num_draws > 1) { - struct pipe_draw_info tmp_info = *info; + struct pipe_draw_info tmp_info = *info; - for (unsigned i = 0; i < num_draws; i++) { - fd_draw_vbo(pctx, &tmp_info, indirect, &draws[i], 1); - if (tmp_info.increment_draw_id) - tmp_info.drawid++; - } - return; + for (unsigned i = 0; i < num_draws; i++) { + fd_draw_vbo(pctx, &tmp_info, indirect, &draws[i], 1); + if (tmp_info.increment_draw_id) + tmp_info.drawid++; + } + return; } - if (!indirect && (!draws[0].count || !info->instance_count)) - return; + if (!indirect && (!draws[0].count || !info->instance_count)) + return; struct fd_context *ctx = fd_context(pctx); @@ -285,7 +285,7 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info, if (info->index_size) { if (info->has_user_indices) { if (!util_upload_index_buffer(pctx, info, &draws[0], - &indexbuf, &index_offset, 4)) + &indexbuf, &index_offset, 4)) return; new_info = *info; new_info.index.resource = indexbuf; diff --git a/src/gallium/drivers/freedreno/freedreno_draw.h b/src/gallium/drivers/freedreno/freedreno_draw.h index 477b3088bf3..f45b1953898 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.h +++ b/src/gallium/drivers/freedreno/freedreno_draw.h @@ -145,7 +145,7 @@ 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, + const struct pipe_draw_start_count *draw, unsigned index_offset) { struct pipe_resource *idx_buffer = NULL; diff --git a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c index 743af58b240..f6689608efc 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c @@ -225,6 +225,7 @@ ir3_shader_create(struct ir3_compiler *compiler, ir3_shader_variant(shader, key, false, debug); } + /* For vertex shaders, also compile initial binning pass shader: */ if (nir->info.stage == MESA_SHADER_VERTEX) { key.safe_constlen = false; v = ir3_shader_variant(shader, key, true, debug);