Closed PENGUINLIONG closed 4 months ago
Will there be a performance hit by doing this? If so, then perhaps it needs to be an optional parm.
@SRSaunders Is there anything I could refer to?
Will there be a performance hit by doing this? If so, then perhaps it needs to be an optional parm.
This is a good point, and probably the reason we originally set barrier
to NO
.
Apple's doc does indicate that it may affect GPU performance, as one would expect from any barrier.
However, the Vulkan spec explicitly states:
When
vkCmdWriteTimestamp
is submitted to a queue, it defines an execution dependency on commands that were submitted before it, and writes a timestamp to a query pool.
which would indicate that a barrier is required and expected here, and that timestamp scope accuracy is more important than absolute performance.
Some context: https://github.com/KhronosGroup/MoltenVK/issues/2235.