freedreno: Rename "is_blit" to "is_discard_blit"
authorEric Anholt <eric@anholt.net>
Sat, 28 Mar 2020 00:13:25 +0000 (17:13 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 30 Mar 2020 21:35:21 +0000 (21:35 +0000)
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>

src/gallium/drivers/freedreno/a3xx/fd3_draw.c
src/gallium/drivers/freedreno/a4xx/fd4_draw.c
src/gallium/drivers/freedreno/freedreno_blitter.c
src/gallium/drivers/freedreno/freedreno_context.h
src/gallium/drivers/freedreno/freedreno_draw.c

index 94dbd008a7dace6d3ce26969de7c7b62c027e54e..99e44db374c3c721c09e08ebe07f67675a09c502 100644 (file)
@@ -126,7 +126,7 @@ fd3_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
                        .color_two_side = ctx->rasterizer->light_twoside,
                        .vclamp_color = ctx->rasterizer->clamp_vertex_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),
                        .has_per_samp = (fd3_ctx->fsaturate || fd3_ctx->vsaturate),
                        .vsaturate_s = fd3_ctx->vsaturate_s,
index a32aa75dec5e5e5a2a29f94048772e339ef2f3bd..9c8ef830051cf57abe46047cb32faf3dd3162962 100644 (file)
@@ -111,7 +111,7 @@ fd4_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
                        .vclamp_color = ctx->rasterizer->clamp_vertex_color,
                        .fclamp_color = ctx->rasterizer->clamp_fragment_color,
                        .rasterflat = ctx->rasterizer->flatshade,
-                       .half_precision = ctx->in_blit &&
+                       .half_precision = ctx->in_discard_blit &&
                                        fd_half_precision(&ctx->batch->framebuffer),
                        .ucp_enables = ctx->rasterizer->clip_plane_enable,
                        .has_per_samp = (fd4_ctx->fsaturate || fd4_ctx->vsaturate ||
index ca6cd8ebdcd017b26cb7a31b05a6c913a26f46e1..63906c3bba58f13aacbf79d4fbcd4921cf3fe638 100644 (file)
@@ -114,7 +114,7 @@ fd_blitter_pipe_begin(struct fd_context *ctx, bool render_cond, bool discard,
        if (ctx->batch)
                fd_batch_set_stage(ctx->batch, stage);
 
-       ctx->in_blit = discard;
+       ctx->in_discard_blit = discard;
 }
 
 static void
@@ -122,7 +122,7 @@ fd_blitter_pipe_end(struct fd_context *ctx)
 {
        if (ctx->batch)
                fd_batch_set_stage(ctx->batch, FD_STAGE_NULL);
-       ctx->in_blit = false;
+       ctx->in_discard_blit = false;
 }
 
 bool
index 41f67a87d3c7aa2baed48728524bd9aaa4d32316..e2edf15daa93ba47dc4e71210c7a85e0fbe91e05 100644 (file)
@@ -263,7 +263,7 @@ struct fd_context {
         * contents.  Main point is to eliminate blits from fd_try_shadow_resource().
         * For example, in case of texture upload + gen-mipmaps.
         */
-       bool in_blit : 1;
+       bool in_discard_blit : 1;
 
        struct pipe_scissor_state scissor;
 
index cbbd82b7a23e3ba526e7fb1876cbb86e7fe6078f..e2f51a0c39148cda8b0e51b7b2d2c65158d04664 100644 (file)
@@ -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_context_all_dirty(ctx);
        }
 
-       batch->blit = ctx->in_blit;
+       batch->blit = ctx->in_discard_blit;
        batch->back_blit = ctx->in_shadow;
 
        /* 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);
 
-       if (ctx->in_blit) {
+       if (ctx->in_discard_blit) {
                fd_batch_reset(batch);
                fd_context_all_dirty(ctx);
        }