fix(renderer_vulkan): resolve asynchronous presentation crashes and compilation errors

Fix multiple issues in the Vulkan asynchronous presentation implementation:

- Convert regular mutexes to timed_mutex for timeout support
- Use condition_variable_any for compatibility with timed_mutex
- Fix thread synchronization with proper locking and error handling
- Add VkResultToString helper to replace missing ToString function
- Implement better error recovery with recreation attempt limits
- Add comprehensive logging for better troubleshooting

These changes make the asynchronous presentation feature more robust
and less prone to deadlocks, while keeping it disabled by default since
it may still cause instability in some games.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron 2025-05-01 17:02:03 +10:00
parent f706427815
commit 791b95822d
3 changed files with 203 additions and 43 deletions

View file

@ -401,11 +401,11 @@ struct Values {
Category::RendererAdvanced};
SwitchableSetting<bool> async_presentation{linkage,
#ifdef ANDROID
false, // Disabled due to crashes
false, // Disabled due to instability causing crashes
#else
false, // Disabled due to crashes
false, // Disabled due to instability causing crashes
#endif
"async_presentation", Category::RendererAdvanced}; // Hide from UI
"async_presentation", Category::RendererAdvanced}; // Hidden from UI due to instability
SwitchableSetting<bool> renderer_force_max_clock{linkage, false, "force_max_clock",
Category::RendererAdvanced};
SwitchableSetting<bool> use_reactive_flushing{linkage,