mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 07:45:33 +01:00
MTLUtil: Don't attempt to get all GPUs on non-macOS platforms
This commit is contained in:
parent
50d3ad58df
commit
7edd3aff75
@ -22,12 +22,15 @@ std::vector<MRCOwned<id<MTLDevice>>> Metal::Util::GetAdapterList()
|
|||||||
if (default_dev)
|
if (default_dev)
|
||||||
list.push_back(MRCTransfer(default_dev));
|
list.push_back(MRCTransfer(default_dev));
|
||||||
|
|
||||||
|
#if TARGET_OS_OSX
|
||||||
auto devices = MRCTransfer(MTLCopyAllDevices());
|
auto devices = MRCTransfer(MTLCopyAllDevices());
|
||||||
for (id<MTLDevice> device in devices.Get())
|
for (id<MTLDevice> device in devices.Get())
|
||||||
{
|
{
|
||||||
if (device != default_dev)
|
if (device != default_dev)
|
||||||
list.push_back(MRCRetain(device));
|
list.push_back(MRCRetain(device));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user