From 750c6ed705071bf70cf4b35161cdb327043fecde Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Fri, 20 Mar 2026 21:22:22 -0400 Subject: DriverDetails: Use macOS version as the driver version --- Source/Core/VideoCommon/DriverDetails.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Source/Core/VideoCommon') diff --git a/Source/Core/VideoCommon/DriverDetails.cpp b/Source/Core/VideoCommon/DriverDetails.cpp index 705bd66bab..099afeab73 100644 --- a/Source/Core/VideoCommon/DriverDetails.cpp +++ b/Source/Core/VideoCommon/DriverDetails.cpp @@ -7,6 +7,10 @@ #include "Core/DolphinAnalytics.h" +#ifdef __APPLE__ +#include "Common/CommonFuncs.h" +#endif + namespace DriverDetails { struct BugInfo @@ -198,6 +202,16 @@ void Init(API api, Vendor vendor, Driver driver, const double version, const Fam } } +#ifdef __APPLE__ + // The Metal graphics drivers are part of macOS, so we use the current macOS version as the + // driver version for Metal and Vulkan on Metal. + if (api == API_METAL || (api == API_VULKAN && driver == DRIVER_PORTABILITY)) + { + Common::MacOSVersion mac_version = Common::GetMacOSVersion(); + m_version = mac_version.major * 100 + mac_version.minor; + } +#endif + // Clear bug list, as the API may have changed m_bugs.clear(); -- cgit v1.2.3 From 98ca65377410e42c57dbed6b8eb1a7372293e735 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Fri, 9 Jan 2026 20:17:59 -0500 Subject: DriverDetails: Mark BUG_BROKEN_DISCARD_WITH_EARLY_Z as fixed in macOS 14.0+ --- Source/Core/VideoCommon/DriverDetails.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon') diff --git a/Source/Core/VideoCommon/DriverDetails.cpp b/Source/Core/VideoCommon/DriverDetails.cpp index 099afeab73..b657d7721c 100644 --- a/Source/Core/VideoCommon/DriverDetails.cpp +++ b/Source/Core/VideoCommon/DriverDetails.cpp @@ -152,9 +152,9 @@ constexpr BugInfo m_known_bugs[] = { {API_VULKAN, OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, Family::UNKNOWN, BUG_PRIMITIVE_RESTART, -1.0, -1.0, true}, {API_VULKAN, OS_OSX, VENDOR_APPLE, DRIVER_PORTABILITY, Family::UNKNOWN, - BUG_BROKEN_DISCARD_WITH_EARLY_Z, -1.0, -1.0, true}, + BUG_BROKEN_DISCARD_WITH_EARLY_Z, 1100, 1400, true}, {API_METAL, OS_OSX, VENDOR_APPLE, DRIVER_APPLE, Family::UNKNOWN, - BUG_BROKEN_DISCARD_WITH_EARLY_Z, -1.0, -1.0, true}, + BUG_BROKEN_DISCARD_WITH_EARLY_Z, 1100, 1400, true}, {API_VULKAN, OS_OSX, VENDOR_INTEL, DRIVER_PORTABILITY, Family::UNKNOWN, BUG_BROKEN_DYNAMIC_SAMPLER_INDEXING, -1.0, -1.0, true}, {API_METAL, OS_OSX, VENDOR_INTEL, DRIVER_APPLE, Family::UNKNOWN, -- cgit v1.2.3 From 5a94e63e4289d25964a4df3bf16f87f3c0f5ca61 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Fri, 9 Jan 2026 20:18:23 -0500 Subject: UberShaderPixel: Fix missing check for framebuffer fetch for BUG_BROKEN_DISCARD_WITH_EARLY_Z workaround --- Source/Core/VideoCommon/UberShaderPixel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon') diff --git a/Source/Core/VideoCommon/UberShaderPixel.cpp b/Source/Core/VideoCommon/UberShaderPixel.cpp index be6571ff7f..3370f878ad 100644 --- a/Source/Core/VideoCommon/UberShaderPixel.cpp +++ b/Source/Core/VideoCommon/UberShaderPixel.cpp @@ -1005,7 +1005,8 @@ ShaderCode GenPixelShader(APIType api_type, const ShaderHostConfig& host_config, out.Write(" // Alpha Test\n"); - if (early_depth && DriverDetails::HasBug(DriverDetails::BUG_BROKEN_DISCARD_WITH_EARLY_Z)) + if (early_depth && DriverDetails::HasBug(DriverDetails::BUG_BROKEN_DISCARD_WITH_EARLY_Z) && + host_config.backend_shader_framebuffer_fetch) { // Instead of using discard, fetch the framebuffer's color value and use it as the output // for this fragment. -- cgit v1.2.3