Optimizing Array add performance for large datasets

This commit is contained in:
Dynamitos
2020-03-16 13:29:17 +01:00
parent 3b55755f0c
commit 81b51d1c21
9 changed files with 101 additions and 8 deletions
@@ -117,7 +117,27 @@ void Seele::VulkanGraphics::pickPhysicalDevice()
uint32 deviceRating = 0;
for (auto physicalDevice : physicalDevices)
{
uint32 currentRating = 0;
VkPhysicalDeviceProperties props;
vkGetPhysicalDeviceProperties(physicalDevice, &props);
if (props.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
{
currentRating += 100;
}
else if (props.deviceType == VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU)
{
currentRating += 10;
}
if (currentRating > deviceRating)
{
deviceRating = currentRating;
bestDevice = physicalDevice;
}
}
this->physicalDevice = bestDevice;
}
void Seele::VulkanGraphics::createDevice()
{
}