| 1126 | } |
| 1127 | |
| 1128 | std::vector<AdapterInfo> Device::getGPUs(Type deviceType) |
| 1129 | { |
| 1130 | if (deviceType == Type::Default) |
| 1131 | deviceType = getDefaultDeviceType(); |
| 1132 | auto adapters = gfx::gfxGetAdapters(getGfxDeviceType(deviceType)); |
| 1133 | std::vector<AdapterInfo> result; |
| 1134 | for (gfx::GfxIndex i = 0; i < adapters.getCount(); ++i) |
| 1135 | { |
| 1136 | const gfx::AdapterInfo& gfxInfo = adapters.getAdapters()[i]; |
| 1137 | AdapterInfo info; |
| 1138 | info.name = gfxInfo.name; |
| 1139 | info.vendorID = gfxInfo.vendorID; |
| 1140 | info.deviceID = gfxInfo.deviceID; |
| 1141 | info.luid = *reinterpret_cast<const AdapterLUID*>(&gfxInfo.luid); |
| 1142 | result.push_back(info); |
| 1143 | } |
| 1144 | // Move all NVIDIA adapters to the start of the list. |
| 1145 | std::stable_partition( |
| 1146 | result.begin(), result.end(), [](const AdapterInfo& info) { return toLowerCase(info.name).find("nvidia") != std::string::npos; } |
| 1147 | ); |
| 1148 | return result; |
| 1149 | } |
| 1150 | |
| 1151 | gfx::ITransientResourceHeap* Device::getCurrentTransientResourceHeap() |
| 1152 | { |
nothing calls this directly
no test coverage detected