wgpu_hal::vulkan::Queue::relay_semaphores
may be unnecessary
#6699
Labels
api: vulkan
Issues with Vulkan
area: performance
How fast things go
kind: refactor
Making existing function faster or nicer
In the
wgpu_hal
Vulkan backend, it may be unnecessary to useQueue::relay_semaphores
to establish the execution ordering between successive queue submissions that is promised bywgpu_hal::Queue::submit
. If the buffer and texture pipeline barriers are generated correctly, then that should be all we need.Vulkan defines submission order as follows:
Note that submission order is not execution order: there is no guarantee that, just because A precedes B in submission order, that A will finish execution before B begins, or that A will even begin execution before B does. What you need is an execution dependency between A and B.
It turns out that
vkCmdPipelineBarrier
, which we already emit between any two operations that need it, defines memory dependenciesI'm not familiar with this part of WebGPU or this part of Vulkan, so, definitely check my work. But we already emit
wgpu_hal
barriers between:Depending on the details of the Vulkan pipeline barrier that records, that should establish dependencies sufficient to fulfill the promises
wgpu_hal::Queue::submit
makes.If that's so, we could just delete
wgpu_hal::vulkan::Queue::relay_semaphores
altogether.The text was updated successfully, but these errors were encountered: