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:
parent
7c840f5103
commit
140d3ea8c6
|
@ -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_batch_descriptor_data_lazy *bdd = bdd_lazy(bs);
|
||||||
struct zink_program *pg = is_compute ? &ctx->curr_compute->base : &ctx->curr_program->base;
|
struct zink_program *pg = is_compute ? &ctx->curr_compute->base : &ctx->curr_program->base;
|
||||||
VkDescriptorSet desc_sets[ZINK_DESCRIPTOR_TYPES];
|
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)) {
|
if (!populate_sets(ctx, bdd, pg, &changed_sets, desc_sets)) {
|
||||||
debug_printf("ZINK: couldn't get descriptor sets!\n");
|
debug_printf("ZINK: couldn't get descriptor sets!\n");
|
||||||
return;
|
return;
|
||||||
|
@ -470,7 +473,6 @@ zink_descriptors_update_lazy_masked(struct zink_context *ctx, bool is_compute, u
|
||||||
/* no flushing allowed */
|
/* no flushing allowed */
|
||||||
assert(ctx->batch.state == bs);
|
assert(ctx->batch.state == bs);
|
||||||
|
|
||||||
if (pg->dd->binding_usage && (changed_sets || bind_sets)) {
|
|
||||||
u_foreach_bit(type, changed_sets) {
|
u_foreach_bit(type, changed_sets) {
|
||||||
assert(type + 1 < pg->num_dsl);
|
assert(type + 1 < pg->num_dsl);
|
||||||
if (pg->dd->layout_key[type]) {
|
if (pg->dd->layout_key[type]) {
|
||||||
|
@ -494,7 +496,6 @@ zink_descriptors_update_lazy_masked(struct zink_context *ctx, bool is_compute, u
|
||||||
0, NULL);
|
0, NULL);
|
||||||
}
|
}
|
||||||
dd_lazy(ctx)->state_changed[is_compute] = false;
|
dd_lazy(ctx)->state_changed[is_compute] = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue