Vulkan: Don't wait for vkAcquireNextImage fence on non-Windows targets#9486
Vulkan: Don't wait for vkAcquireNextImage fence on non-Windows targets#9486cohaereo wants to merge 1 commit intogfx-rs:trunkfrom
Conversation
|
@cohaereo Do you have benchmarks or anything to prove that this really is beneficial? I don't think this was a problem we were aware existed. |
|
I've benchmarked this using mangohud in my own application as well as a few of the wgpu examples: For the WGPU example i had to disable The occasional 10ms fence spikes appear far less often on vsync than at high framerates, but they can still be noticeable in interactive applications like a game engine. Additionally, the fix has been tested on other Linux systems with AMD/Adreno GPUs, and I couldn't measure any difference there:
According to @cwfitzgerald:
|




Connections
Related issue #8310
Original implementation #8420
Description
The fence wait was originally added to improve frame pacing on Windows, and should have effectively been a no-op on other platforms. However, on specifically Linux NVIDIA drivers, this causes frequent ~10ms stutters, resulting in major performance degradation.
This PR removes the fence wait on non-Windows targets altogether, improving frame pacing and overall performance for those targets.
Testing
Manually tested
Squash or Rebase?
Rebase
Checklist
wgpumay be affected behaviorally.CHANGELOG.mdentries for the user-facing effects of this change are present.