summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2022-01-06 16:28:15 -0500
committerGitHub <noreply@github.com>2022-01-06 16:28:15 -0500
commit4c0dcf42b8d594cbc12e45f44e38dff46ccaf975 (patch)
treeb503a003f07b7a1d06bfd4f1944df2308838ae28 /Source
parent193ca92cb8ce97445dc5e2c66e0fc5c55c957c22 (diff)
parent9b4e5b00ee7393303285c2010c409244145fee40 (diff)
Merge pull request #10346 from iwubcode/fixed_shader_precompile_parallelization
VideoCommon: Fix shader precompilization detection
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/VideoCommon/DriverDetails.cpp15
-rw-r--r--Source/Core/VideoCommon/DriverDetails.h3
-rw-r--r--Source/Core/VideoCommon/VideoConfig.cpp9
3 files changed, 3 insertions, 24 deletions
diff --git a/Source/Core/VideoCommon/DriverDetails.cpp b/Source/Core/VideoCommon/DriverDetails.cpp
index bb48a06500..0852820735 100644
--- a/Source/Core/VideoCommon/DriverDetails.cpp
+++ b/Source/Core/VideoCommon/DriverDetails.cpp
@@ -132,21 +132,10 @@ constexpr BugInfo m_known_bugs[] = {
-1.0, -1.0, true},
{API_VULKAN, OS_OSX, VENDOR_ATI, DRIVER_PORTABILITY, Family::UNKNOWN,
BUG_BROKEN_SUBGROUP_INVOCATION_ID, -1.0, -1.0, true},
- // Default cases for broken MT precompilation
- // Default cases get replaced by known-good places during init
- {API_OPENGL, OS_ALL, VENDOR_ALL, DRIVER_ALL, Family::UNKNOWN,
+ {API_OPENGL, OS_ANDROID, VENDOR_ALL, DRIVER_ALL, Family::UNKNOWN,
BUG_BROKEN_MULTITHREADED_SHADER_PRECOMPILATION, -1.0, -1.0, true},
- {API_VULKAN, OS_ALL, VENDOR_ALL, DRIVER_ALL, Family::UNKNOWN,
+ {API_VULKAN, OS_ANDROID, VENDOR_ALL, DRIVER_ALL, Family::UNKNOWN,
BUG_BROKEN_MULTITHREADED_SHADER_PRECOMPILATION, -1.0, -1.0, true},
- // known good cases for broken MT precompilation
- {API_OPENGL, OS_OSX, VENDOR_ALL, DRIVER_ALL, Family::UNKNOWN,
- BUG_BROKEN_MULTITHREADED_SHADER_PRECOMPILATION, -1.0, -1.0, false},
- {API_VULKAN, OS_OSX, VENDOR_ALL, DRIVER_ALL, Family::UNKNOWN,
- BUG_BROKEN_MULTITHREADED_SHADER_PRECOMPILATION, -1.0, -1.0, false},
- {API_OPENGL, OS_WINDOWS, VENDOR_ALL, DRIVER_ALL, Family::UNKNOWN,
- BUG_BROKEN_MULTITHREADED_SHADER_PRECOMPILATION, -1.0, -1.0, false},
- {API_VULKAN, OS_WINDOWS, VENDOR_ALL, DRIVER_ALL, Family::UNKNOWN,
- BUG_BROKEN_MULTITHREADED_SHADER_PRECOMPILATION, -1.0, -1.0, false},
};
static std::map<Bug, BugInfo> m_bugs;
diff --git a/Source/Core/VideoCommon/DriverDetails.h b/Source/Core/VideoCommon/DriverDetails.h
index a81ed3d6ff..d03a920abd 100644
--- a/Source/Core/VideoCommon/DriverDetails.h
+++ b/Source/Core/VideoCommon/DriverDetails.h
@@ -318,9 +318,6 @@ enum Bug
// BUG: Multi-threaded shader pre-compilation sometimes crashes
// Used primarily in Videoconfig.cpp's GetNumAutoShaderPreCompilerThreads()
// refer to https://github.com/dolphin-emu/dolphin/pull/9414 for initial validation coverage
- // All untested platforms will report as having this bug as to avoid crashes
- // Note that things should highly likely work out fine on D3D
- // so we didn't extend the Bug API to also support D3D
BUG_BROKEN_MULTITHREADED_SHADER_PRECOMPILATION
};
diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp
index c8f79b0e66..a4aa9bda55 100644
--- a/Source/Core/VideoCommon/VideoConfig.cpp
+++ b/Source/Core/VideoCommon/VideoConfig.cpp
@@ -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;