zink: do batch-program tracking after possibly cycling batch in update_descriptors()
ensure we have the right batch here Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273>
This commit is contained in:

committed by
Marge Bot

parent
c7da40b2eb
commit
0e1742ba02
@@ -519,11 +519,6 @@ update_descriptors(struct zink_context *ctx, struct zink_screen *screen, bool is
|
|||||||
dsl = ctx->curr_program->base.dsl;
|
dsl = ctx->curr_program->base.dsl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_compute)
|
|
||||||
zink_batch_reference_program(batch, &ctx->curr_compute->base);
|
|
||||||
else
|
|
||||||
zink_batch_reference_program(batch, &ctx->curr_program->base);
|
|
||||||
|
|
||||||
if (batch->descs_used + num_descriptors >= batch->max_descs) {
|
if (batch->descs_used + num_descriptors >= batch->max_descs) {
|
||||||
batch->descs_used += num_descriptors;
|
batch->descs_used += num_descriptors;
|
||||||
if (is_compute)
|
if (is_compute)
|
||||||
@@ -533,6 +528,11 @@ update_descriptors(struct zink_context *ctx, struct zink_screen *screen, bool is
|
|||||||
batch = zink_batch_rp(ctx);
|
batch = zink_batch_rp(ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (is_compute)
|
||||||
|
zink_batch_reference_program(batch, &ctx->curr_compute->base);
|
||||||
|
else
|
||||||
|
zink_batch_reference_program(batch, &ctx->curr_program->base);
|
||||||
|
|
||||||
VkDescriptorSet desc_set = allocate_descriptor_set(screen, batch,
|
VkDescriptorSet desc_set = allocate_descriptor_set(screen, batch,
|
||||||
dsl, num_descriptors);
|
dsl, num_descriptors);
|
||||||
/* probably oom, so we need to stall until we free up some descriptors */
|
/* probably oom, so we need to stall until we free up some descriptors */
|
||||||
|
Reference in New Issue
Block a user