From 517a9774442d39b641e4a893a6734994dfe0074d Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 11 Mar 2018 14:24:45 +1000 Subject: ShaderCache: Fix several issues in background shader compiling - In D3D, shaders could be compiled on the main thread, blocking startup. - Reduced the latency between a pipeline being requested and used in all backends in hybrid ubershader mode, when no shader stages were present. - Fixed a case where async compilation could cause the same UID to be appended multiple times to the UID cache. - Fix incorrect number of threads being used when immediately compile shaders was enabled. --- Source/Core/VideoCommon/VideoConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/VideoConfig.cpp') diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index 271223ba3d..55abd69e75 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -198,7 +198,7 @@ u32 VideoConfig::GetShaderCompilerThreads() const u32 VideoConfig::GetShaderPrecompilerThreads() const { // When using background compilation, always keep the same thread count. - if (bWaitForShadersBeforeStarting) + if (!bWaitForShadersBeforeStarting) return GetShaderCompilerThreads(); if (!backend_info.bSupportsBackgroundCompiling) -- cgit v1.2.3