mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 22:29:21 +00:00
MTLUtil: Don't attempt to get all GPUs on non-macOS platforms
This commit is contained in:
parent
50d3ad58df
commit
7edd3aff75
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue