Skip to content

Fifo present mode occasionally returns VK_TIMEOUT without blocking in wgpu-rs examples on certain systems #1218

Closed
@Imberflur

Description

@Imberflur

Description
wgpu provides a 1s timeout which ends up being passed to Swapchain::acquire_next_image in ash however on my system sometimes VK_TIMEOUT will be returned within ~20-200µs when using the Fifo present mode. This occurs every few seconds for me on the wgpu-rs water example (Note: most of the examples use Mailbox by default so to test this the present mode needs to be changed).

Repro steps
Modify the example framework of wgpu-rs to use PresentMode::Fifo and to print errors from swapchain.get_current_frame(). Then run the water example and look for any timeout errors.

Expected vs observed behavior
get_current_frame() blocks until a frame is available or has a timeout error after 1 second when using Fifo.

Extra materials

Platform

OS: Manjaro 20.2.1 Nibia
Kernel: x86_64 Linux 5.10.7-3-MANJARO
DE: Xfce4
CPU: Intel Core i5-4690 @ 4x 3.9GHz
GPU: AMD Radeon HD 7900 Series (TAHITI, DRM 3.40.0, 5.10.7-3-MANJARO, LLVM 11.0.1)
drivers tested: radv, amdvlk, vulkan-amdgpu-pro

wgpu version is the git version a little bit after 0.7 release

I was also able to test on a newish intel iGPU laptop with the same OS and did not see the issue. I believe @kvark also tested on another device and the issue wasn't present. Thus, so far it seems like a quirk of this particular device/drivers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: wsiIssues with swapchain management or windowingbackend: vulkanIssues with Vulkanexternal: driver-bugA driver is causing the bug, though we may still want to work around ithelp requiredWe need community help to make this happen.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions