KhronosGroup / MoltenVK

MoltenVK is a Vulkan Portability implementation. It layers a subset of the high-performance, industry-standard Vulkan graphics and compute API over Apple's Metal graphics framework, enabling Vulkan applications to run on macOS, iOS and tvOS.
Apache License 2.0
4.81k stars 426 forks source link

can we make MVK_CONFIG_RESUME_LOST_DEVICE=1 the default? #1562

Open Gcenx opened 2 years ago

Gcenx commented 2 years ago

When attempting to play Witcher 3 the game will simply lockup see LastRunWine.log

If MVK_CONFIG_RESUME_LOST_DEVICE=1 is set however the game will continue as normal

rcaridade145 commented 2 years ago

https://faq.sealedabstract.com/metal_faq/#ioaf-code-262 wonder if this is of any help.

billhollings commented 2 years ago

Vulkan does require that an app handle VK_ERROR_DEVICE_LOST and recreate the VkDevice, even if the error affects only a single command buffer.

However, many apps don't bother with this, and crash if VK_ERROR_DEVICE_LOST is encountered.

Looking for feedback from app devs regarding which option is more practical. @cdavis5e?

From the notes about MVK_CONFIG_RESUME_LOST_DEVICE...

https://github.com/KhronosGroup/MoltenVK/blob/76aca81fac8fd38a50eb91e60c879e28cf9dbd1b/MoltenVK/MoltenVK/API/vk_mvk_moltenvk.h#L782-L805

Gcenx commented 2 years ago

Instead wouldn’t it make more sense to be enabled by default but provide an error explaining the issue “Command submission failed” instead of just reporting “ VK_ERROR_DEVICE_LOST”