mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-05-19 08:00:27 +00:00
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:
@@ -639,27 +639,22 @@ public:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// First, try to find a low power (Intel) or unified memory (Apple Silicon) GPU
|
||||
for (id<MTLDevice> 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<MTLDevice> 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
|
||||
|
||||
Reference in New Issue
Block a user