freedreno: Rename "is_blit" to "is_discard_blit"
It's about the special case of an overwrite of a level meaning we can discard old batch contents. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
This commit is contained in:
parent
8cdc6c1e4b
commit
57d54bcf99
|
@ -126,7 +126,7 @@ fd3_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
|
||||||
.color_two_side = ctx->rasterizer->light_twoside,
|
.color_two_side = ctx->rasterizer->light_twoside,
|
||||||
.vclamp_color = ctx->rasterizer->clamp_vertex_color,
|
.vclamp_color = ctx->rasterizer->clamp_vertex_color,
|
||||||
.fclamp_color = ctx->rasterizer->clamp_fragment_color,
|
.fclamp_color = ctx->rasterizer->clamp_fragment_color,
|
||||||
.half_precision = ctx->in_blit &&
|
.half_precision = ctx->in_discard_blit &&
|
||||||
fd_half_precision(&ctx->batch->framebuffer),
|
fd_half_precision(&ctx->batch->framebuffer),
|
||||||
.has_per_samp = (fd3_ctx->fsaturate || fd3_ctx->vsaturate),
|
.has_per_samp = (fd3_ctx->fsaturate || fd3_ctx->vsaturate),
|
||||||
.vsaturate_s = fd3_ctx->vsaturate_s,
|
.vsaturate_s = fd3_ctx->vsaturate_s,
|
||||||
|
|
|
@ -111,7 +111,7 @@ fd4_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
|
||||||
.vclamp_color = ctx->rasterizer->clamp_vertex_color,
|
.vclamp_color = ctx->rasterizer->clamp_vertex_color,
|
||||||
.fclamp_color = ctx->rasterizer->clamp_fragment_color,
|
.fclamp_color = ctx->rasterizer->clamp_fragment_color,
|
||||||
.rasterflat = ctx->rasterizer->flatshade,
|
.rasterflat = ctx->rasterizer->flatshade,
|
||||||
.half_precision = ctx->in_blit &&
|
.half_precision = ctx->in_discard_blit &&
|
||||||
fd_half_precision(&ctx->batch->framebuffer),
|
fd_half_precision(&ctx->batch->framebuffer),
|
||||||
.ucp_enables = ctx->rasterizer->clip_plane_enable,
|
.ucp_enables = ctx->rasterizer->clip_plane_enable,
|
||||||
.has_per_samp = (fd4_ctx->fsaturate || fd4_ctx->vsaturate ||
|
.has_per_samp = (fd4_ctx->fsaturate || fd4_ctx->vsaturate ||
|
||||||
|
|
|
@ -114,7 +114,7 @@ fd_blitter_pipe_begin(struct fd_context *ctx, bool render_cond, bool discard,
|
||||||
if (ctx->batch)
|
if (ctx->batch)
|
||||||
fd_batch_set_stage(ctx->batch, stage);
|
fd_batch_set_stage(ctx->batch, stage);
|
||||||
|
|
||||||
ctx->in_blit = discard;
|
ctx->in_discard_blit = discard;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -122,7 +122,7 @@ fd_blitter_pipe_end(struct fd_context *ctx)
|
||||||
{
|
{
|
||||||
if (ctx->batch)
|
if (ctx->batch)
|
||||||
fd_batch_set_stage(ctx->batch, FD_STAGE_NULL);
|
fd_batch_set_stage(ctx->batch, FD_STAGE_NULL);
|
||||||
ctx->in_blit = false;
|
ctx->in_discard_blit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -263,7 +263,7 @@ struct fd_context {
|
||||||
* contents. Main point is to eliminate blits from fd_try_shadow_resource().
|
* contents. Main point is to eliminate blits from fd_try_shadow_resource().
|
||||||
* For example, in case of texture upload + gen-mipmaps.
|
* For example, in case of texture upload + gen-mipmaps.
|
||||||
*/
|
*/
|
||||||
bool in_blit : 1;
|
bool in_discard_blit : 1;
|
||||||
|
|
||||||
struct pipe_scissor_state scissor;
|
struct pipe_scissor_state scissor;
|
||||||
|
|
||||||
|
|
|
@ -112,12 +112,12 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->in_blit) {
|
if (ctx->in_discard_blit) {
|
||||||
fd_batch_reset(batch);
|
fd_batch_reset(batch);
|
||||||
fd_context_all_dirty(ctx);
|
fd_context_all_dirty(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
batch->blit = ctx->in_blit;
|
batch->blit = ctx->in_discard_blit;
|
||||||
batch->back_blit = ctx->in_shadow;
|
batch->back_blit = ctx->in_shadow;
|
||||||
|
|
||||||
/* NOTE: needs to be before resource_written(batch->query_buf), otherwise
|
/* NOTE: needs to be before resource_written(batch->query_buf), otherwise
|
||||||
|
@ -323,7 +323,7 @@ fd_clear(struct pipe_context *pctx, unsigned buffers,
|
||||||
|
|
||||||
fd_fence_ref(&ctx->last_fence, NULL);
|
fd_fence_ref(&ctx->last_fence, NULL);
|
||||||
|
|
||||||
if (ctx->in_blit) {
|
if (ctx->in_discard_blit) {
|
||||||
fd_batch_reset(batch);
|
fd_batch_reset(batch);
|
||||||
fd_context_all_dirty(ctx);
|
fd_context_all_dirty(ctx);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue