zink: add some asserts for pipeline barriers to check renderpass state

it's illegal to emit barriers during a renderpass

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543>
This commit is contained in:
Mike Blumenkrantz 2020-10-13 10:12:40 -04:00
parent f4a53287de
commit 2b18105ff7
1 changed files with 2 additions and 0 deletions

View File

@ -1445,6 +1445,7 @@ zink_resource_image_barrier(struct zink_context *ctx, struct zink_batch *batch,
else
batch = zink_batch_no_rp(ctx);
}
assert(!batch->in_rp);
VkImageSubresourceRange isr = {
res->aspect,
0, VK_REMAINING_MIP_LEVELS,
@ -1542,6 +1543,7 @@ zink_resource_buffer_barrier(struct zink_context *ctx, struct zink_batch *batch,
else
batch = zink_batch_no_rp(ctx);
}
assert(!batch->in_rp);
VkBufferMemoryBarrier bmb = {
VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER,
NULL,