Merge pull request #10346 from iwubcode/fixed_shader_precompile_parallelization

VideoCommon: Fix shader precompilization detection
This commit is contained in:
JMC47 authored and GitHub committed 2022-01-06 16:28:15 -05:00
commit 4c0dcf42b8
3 files changed
+3 -24

No files matched your search

+1 -8
View File
@@ -206,16 +206,9 @@ u32 VideoConfig::GetShaderPrecompilerThreads() const
if (!backend_info.bSupportsBackgroundCompiling)
return 0;
const bool bugDatabaseSupported =
backend_info.api_type == APIType::OpenGL || backend_info.api_type == APIType::Vulkan;
// DirectX has always worked in our tests in PR#9414
const bool multiThreadingWorking =
!bugDatabaseSupported ||
!DriverDetails::HasBug(DriverDetails::BUG_BROKEN_MULTITHREADED_SHADER_PRECOMPILATION);
if (iShaderPrecompilerThreads >= 0)
return static_cast<u32>(iShaderPrecompilerThreads);
else if (multiThreadingWorking)
else if (!DriverDetails::HasBug(DriverDetails::BUG_BROKEN_MULTITHREADED_SHADER_PRECOMPILATION))
return GetNumAutoShaderPreCompilerThreads();
else
return 1;