Skip to content

Conversation

@KacperZielinski-Intel
Copy link

Simplified structure of faulty command buffer:

buildTlas command buffer

vkCmdPipelineBarrier is set to synchronize VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR operations, both before and after this barrier (srcStageMask and dstStageMask).

However, Vulkan specification states that vkCmdCopyBuffer is executed in pipeline stage covered by VK_PIPELINE_STAGE_TRANSFER_BIT,
which means that this vkCmdPipelineBarrier is not guaranteed to synchronize a vkCmdCopyBuffer operation,
as srcStageMask argument is instead set to VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR.

To summarize:

Argument srcStageMask in vkCmdPipelineBarrier is incorrectly set to
VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, when it should be set to VK_PIPELINE_STAGE_TRANSFER_BIT
in order to guarantee synchronization of vkCmdCopyBuffer.

Argument `srcStageMask` in `vkCmdPipelineBarrier` should be set to `VK_PIPELINE_STAGE_TRANSFER_BIT`
in order to guarantee synchronization of `vkCmdCopyBuffer`.

Signed-off-by: Kacper Zielinski <kacper.zielinski@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant