MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / getGPUs

Method getGPUs

Source/Falcor/Core/API/Device.cpp:1128–1149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1126}
1127
1128std::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
1151gfx::ITransientResourceHeap* Device::getCurrentTransientResourceHeap()
1152{

Callers

nothing calls this directly

Calls 6

getDefaultDeviceTypeFunction · 0.85
getGfxDeviceTypeFunction · 0.85
toLowerCaseFunction · 0.85
push_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected