Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix first vkCmdPipelineBarrier in buildTlas's command buffer #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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 <[email protected]>
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