Synchronization between command buffers in Vulkan

前端 未结 2 802
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-23 12:27

There are several ways to handle synchronization in Vulkan. This is how I understand it:

  • Fences are GPU to CPU syncs.
  • Semaphores are GPU to GPU syncs,
2条回答
  •  余生分开走
    2020-12-23 12:39

    For your scenario you should use events. These should be the most light-weight synchronization objects to sync execution of two command buffers in a given order, even if you submit them at once. But note that events do not work across different queues. If you only use one, use events and try to keep src and dst pipeline stage masks as narrow as possible.

    Semaphores are another way of synchronizing command buffer execution, but these only work on the queue submission, so they're more heavy-weight than events.

提交回复
热议问题