mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 12:08:06 +02:00
zink: when skipping a TRANSFER_DST image barrier, set access tracking
this otherwise breaks subsequent barriers if the first barrier of the batch is a TRANSFER_DST on an image that can skip such a barrier Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21583>
This commit is contained in:
parent
e650ff4ea0
commit
c3cc8455d4
1 changed files with 5 additions and 1 deletions
|
|
@ -3809,8 +3809,12 @@ void
|
|||
zink_resource_image_transfer_dst_barrier(struct zink_context *ctx, struct zink_resource *res, unsigned level, const struct pipe_box *box)
|
||||
{
|
||||
/* skip TRANSFER_DST barrier if no intersection from previous copies */
|
||||
if (res->layout != VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL || zink_resource_copy_box_intersects(res, level, box))
|
||||
if (res->layout != VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL || zink_resource_copy_box_intersects(res, level, box)) {
|
||||
zink_screen(ctx->base.screen)->image_barrier(ctx, res, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT);
|
||||
} else {
|
||||
res->obj->access = VK_ACCESS_TRANSFER_WRITE_BIT;
|
||||
res->obj->access_stage = VK_PIPELINE_STAGE_TRANSFER_BIT;
|
||||
}
|
||||
zink_resource_copy_box_add(res, level, box);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue