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)
|
||||
list.push_back(MRCTransfer(default_dev));
|
||||
|
||||
#if TARGET_OS_OSX
|
||||
auto devices = MRCTransfer(MTLCopyAllDevices());
|
||||
for (id<MTLDevice> device in devices.Get())
|
||||
{
|
||||
if (device != default_dev)
|
||||
list.push_back(MRCRetain(device));
|
||||
}
|
||||
#endif
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue