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
This commit is contained in:
Cameron Gutman
2026-05-14 00:45:57 -05:00
parent 7d6ce0b4cc
commit 9cbba106ad
@@ -639,27 +639,22 @@ public:
return nullptr; return nullptr;
} }
// First, try to find a low power (Intel) or unified memory (Apple Silicon) GPU
for (id<MTLDevice> device in devices) { for (id<MTLDevice> device in devices) {
if (device.isLowPower || device.hasUnifiedMemory) { if (device.isLowPower || device.hasUnifiedMemory) {
return device; return device;
} }
} }
if (!m_HwAccel) { // Next, we'll just try to pick something internal to the system
// Metal software decoding is always available for (id<MTLDevice> device in devices) {
return [MTLCreateSystemDefaultDevice() autorelease]; if (!device.isRemovable) {
} return device;
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.");
} }
return nullptr; // Use the system-default device
return [MTLCreateSystemDefaultDevice() autorelease];
} }
virtual bool initialize(PDECODER_PARAMETERS params) override virtual bool initialize(PDECODER_PARAMETERS params) override