From b251194a7ed9b997049b73804496f5a9218f3b81 Mon Sep 17 00:00:00 2001 From: iwubcode Date: Tue, 10 Oct 2023 17:45:52 -0500 Subject: [PATCH] VideoCommon: wait for the GPU to be finished doing any work before invalidating pipelines when graphic config changes --- Source/Core/VideoCommon/VideoConfig.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index 69f294f827..426d8f7c8b 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -369,6 +369,7 @@ void CheckForConfigChanges() if (changed_bits & (CONFIG_CHANGE_BIT_HOST_CONFIG | CONFIG_CHANGE_BIT_MULTISAMPLES)) { OSD::AddMessage("Video config changed, reloading shaders.", OSD::Duration::NORMAL); + g_gfx->WaitForGPUIdle(); g_vertex_manager->InvalidatePipelineObject(); g_vertex_manager->NotifyCustomShaderCacheOfHostChange(new_host_config); g_shader_cache->SetHostConfig(new_host_config);