zink: add an early return for zink_descriptors_update_lazy_masked()

no point in generating pools/sets that won't be used here

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13350>
This commit is contained in:
Mike Blumenkrantz 2021-10-13 09:32:09 -04:00 committed by Marge Bot
parent 7c840f5103
commit 140d3ea8c6
1 changed files with 20 additions and 19 deletions

View File

@ -463,6 +463,9 @@ zink_descriptors_update_lazy_masked(struct zink_context *ctx, bool is_compute, u
struct zink_batch_descriptor_data_lazy *bdd = bdd_lazy(bs);
struct zink_program *pg = is_compute ? &ctx->curr_compute->base : &ctx->curr_program->base;
VkDescriptorSet desc_sets[ZINK_DESCRIPTOR_TYPES];
if (!pg->dd->binding_usage || (!changed_sets && !bind_sets))
return;
if (!populate_sets(ctx, bdd, pg, &changed_sets, desc_sets)) {
debug_printf("ZINK: couldn't get descriptor sets!\n");
return;
@ -470,7 +473,6 @@ zink_descriptors_update_lazy_masked(struct zink_context *ctx, bool is_compute, u
/* no flushing allowed */
assert(ctx->batch.state == bs);
if (pg->dd->binding_usage && (changed_sets || bind_sets)) {
u_foreach_bit(type, changed_sets) {
assert(type + 1 < pg->num_dsl);
if (pg->dd->layout_key[type]) {
@ -495,7 +497,6 @@ zink_descriptors_update_lazy_masked(struct zink_context *ctx, bool is_compute, u
}
dd_lazy(ctx)->state_changed[is_compute] = false;
}
}
void
zink_descriptors_update_lazy(struct zink_context *ctx, bool is_compute)