zink: flatten descriptor_refs_dirty into BATCH_CHANGED template

that's all this is now

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964>
This commit is contained in:
Mike Blumenkrantz
2021-05-11 16:20:09 -04:00
committed by Marge Bot
parent 96559e7418
commit 405d45f009
3 changed files with 2 additions and 5 deletions
-2
View File
@@ -1853,7 +1853,6 @@ zink_update_descriptor_refs(struct zink_context *ctx, bool compute)
if (ctx->curr_program)
zink_batch_reference_program(batch, &ctx->curr_program->base);
}
ctx->descriptor_refs_dirty[compute] = false;
}
static void
@@ -1876,7 +1875,6 @@ flush_batch(struct zink_context *ctx, bool sync)
zink_start_batch(ctx, batch);
if (zink_screen(ctx->base.screen)->info.have_EXT_transform_feedback && ctx->num_so_targets)
ctx->dirty_so_targets = true;
ctx->descriptor_refs_dirty[0] = ctx->descriptor_refs_dirty[1] = true;
ctx->pipeline_changed[0] = ctx->pipeline_changed[1] = true;
zink_select_draw_vbo(ctx);
zink_select_launch_grid(ctx);
-1
View File
@@ -288,7 +288,6 @@ struct zink_context {
struct zink_descriptor_surface sampler_surfaces[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
struct zink_descriptor_surface image_surfaces[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_IMAGES];
} di;
bool descriptor_refs_dirty[2];
struct set *need_barriers[2]; //gfx, compute
struct set update_barriers[2][2]; //[gfx, compute][current, next]
uint8_t barrier_set_idx[2];
+2 -2
View File
@@ -491,7 +491,7 @@ zink_draw_vbo(struct pipe_context *pctx,
barrier_draw_buffers(ctx, dinfo, dindirect, index_buffer);
if (ctx->descriptor_refs_dirty[0])
if (BATCH_CHANGED)
zink_update_descriptor_refs(ctx, false);
batch = zink_batch_rp(ctx);
@@ -776,7 +776,7 @@ zink_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
VkPipeline pipeline = zink_get_compute_pipeline(screen, ctx->curr_compute,
&ctx->compute_pipeline_state);
if (ctx->descriptor_refs_dirty[1])
if (BATCH_CHANGED)
zink_update_descriptor_refs(ctx, true);
if (prev_pipeline != pipeline || BATCH_CHANGED)