Vulkan: Don't use multithreaded rendering if frames-in-flight is set to 1

It has no benefit, and loses by a few percent in simple benchmarking.
This commit is contained in:
Henrik Rydgård committed 2023-08-01 21:08:07 +02:00
1 parent 25de32b7d3
commit ffd5e57a20
5 files changed
+21 -5

No files matched your search

+5 -1
View File
@@ -113,7 +113,11 @@ bool AndroidVulkanContext::InitFromRenderThread(ANativeWindow *wnd, int desiredB
bool success = true;
if (g_Vulkan->InitSwapchain()) {
draw_ = Draw::T3DCreateVulkanContext(g_Vulkan, g_Config.bRenderMultiThreading);
bool useMultiThreading = g_Config.bRenderMultiThreading;
if (g_Config.iInflightFrames == 1) {
useMultiThreading = false;
}
draw_ = Draw::T3DCreateVulkanContext(g_Vulkan, useMultiThreading);
SetGPUBackend(GPUBackend::VULKAN);
success = draw_->CreatePresets(); // Doesn't fail, we ship the compiler.
_assert_msg_(success, "Failed to compile preset shaders");