From c48035908cc1821625c135b9a96e09e47264ed45 Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Tue, 21 Jun 2022 04:07:54 -0500 Subject: [PATCH] VideoBackends:Metal: Use unified memory path by default on all GPUs --- Source/Core/VideoBackends/Metal/MTLUtil.mm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Core/VideoBackends/Metal/MTLUtil.mm b/Source/Core/VideoBackends/Metal/MTLUtil.mm index b80b235436..85ac96b342 100644 --- a/Source/Core/VideoBackends/Metal/MTLUtil.mm +++ b/Source/Core/VideoBackends/Metal/MTLUtil.mm @@ -211,12 +211,13 @@ void Metal::Util::PopulateBackendInfoFeatures(VideoConfig* config, id config->backend_info.AAModes.push_back(i); } + // The unified memory path (using shared buffers for everything) performs noticeably better with + // bbox even on discrete GPUs (20fps vs 15fps in Super Paper Mario elevator), so default to that. + // The separate buffer + manual upload path is left available for testing and comparison. if (char* env = getenv("MTL_UNIFIED_MEMORY")) g_features.unified_memory = env[0] == '1' || env[0] == 'y' || env[0] == 'Y'; - else if (@available(macOS 10.15, iOS 13.0, *)) - g_features.unified_memory = [device hasUnifiedMemory]; else - g_features.unified_memory = false; + g_features.unified_memory = true; g_features.subgroup_ops = false; if (@available(macOS 10.15, iOS 13, *))