Vulkan: fix sync hazards (#2419)

- write-after-write when blitting to the same image
- missing barrier between compute dispatches if a view has no draws
This commit is contained in:
pezcode 2021-03-07 03:56:55 +01:00 committed by GitHub
parent a735fccd15
commit 02e4786e04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6958,6 +6958,12 @@ VK_DESTROY
, &blitInfo
, filter
);
setMemoryBarrier(
m_commandBuffer
, VK_PIPELINE_STAGE_TRANSFER_BIT
, VK_PIPELINE_STAGE_TRANSFER_BIT
);
}
if (oldSrcLayout != VK_IMAGE_LAYOUT_UNDEFINED)
@ -7131,8 +7137,8 @@ VK_DESTROY
}
// renderpass external subpass dependencies handle graphics -> compute and compute -> graphics
// but not compute -> compute
if (wasCompute && isCompute)
// but not compute -> compute (possibly also across views if they contain no draw calls)
if (wasCompute)
{
setMemoryBarrier(
m_commandBuffer