forked from Dynamitos/Seele
Preparing for Writeup
This commit is contained in:
1 parent
2cb70d7b16
commit
b1d8ef4120
40 files changed
+284
-192
No files matched your search
@@ -432,16 +432,19 @@ void Graphics::pickPhysicalDevice()
|
||||
vkGetPhysicalDeviceFeatures(dev, &features);
|
||||
if (props.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
|
||||
{
|
||||
std::cout << "found dedicated gpu " << props.deviceName << std::endl;
|
||||
currentRating += 100;
|
||||
}
|
||||
else if (props.deviceType == VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU)
|
||||
{
|
||||
std::cout << "found integrated gpu " << props.deviceName << std::endl;
|
||||
currentRating += 10;
|
||||
}
|
||||
if (currentRating > deviceRating)
|
||||
{
|
||||
deviceRating = currentRating;
|
||||
bestDevice = dev;
|
||||
std::cout << "bestDevice: " << props.deviceName << std::endl;
|
||||
}
|
||||
}
|
||||
physicalDevice = bestDevice;
|
||||
|
||||
Reference in new issue
Block a user