From 9cbba106ad817f895b2337f81017451a178c425d Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 14 May 2026 00:45:57 -0500 Subject: [PATCH] Use the Metal renderer by default on all Macs Whatever dGPU/eGPU rendering issues existed at the time I wrote that check seem to no longer happen on my RX 480 eGPU test setup running Ventura (our oldest supported OS). It seems safe enough to enable now, especially since 7d6ce0b4c should catch broken systems and transparently fall back to AVSampleBufferDisplayLayer. Fixes #1885 --- .../video/ffmpeg-renderers/vt_metal.mm | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/app/streaming/video/ffmpeg-renderers/vt_metal.mm b/app/streaming/video/ffmpeg-renderers/vt_metal.mm index d1061026..57cc544b 100644 --- a/app/streaming/video/ffmpeg-renderers/vt_metal.mm +++ b/app/streaming/video/ffmpeg-renderers/vt_metal.mm @@ -639,27 +639,22 @@ public: return nullptr; } + // First, try to find a low power (Intel) or unified memory (Apple Silicon) GPU for (id device in devices) { if (device.isLowPower || device.hasUnifiedMemory) { return device; } } - if (!m_HwAccel) { - // Metal software decoding is always available - return [MTLCreateSystemDefaultDevice() autorelease]; - } - else if (qgetenv("VT_FORCE_METAL") == "1") { - SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, - "Using Metal renderer due to VT_FORCE_METAL=1 override."); - return [MTLCreateSystemDefaultDevice() autorelease]; - } - else { - SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, - "Avoiding Metal renderer due to use of dGPU/eGPU. Use VT_FORCE_METAL=1 to override."); + // Next, we'll just try to pick something internal to the system + for (id device in devices) { + if (!device.isRemovable) { + return device; + } } - return nullptr; + // Use the system-default device + return [MTLCreateSystemDefaultDevice() autorelease]; } virtual bool initialize(PDECODER_PARAMETERS params) override