There are two factors that I've found to be the simplest and easiest way to decide which of the available GPUs will be the most powerful for a game:
- Device Type (Discrete vs. Integrated vs. Other)
- Graphics Memory
Now of course for gaming more VRAM doesn't always mean better performance (a 980 Ti [6GB] usually outperforms a Titan X [12GB] in games) but in most cases the best GPU for your game will be a discrete GPU with the most available device local heap on a typical player's computer.
Now in Vulkan, it's fairly simple to check these properties by getting a list of physical devices, getting their device properties, getting their memory properties, and then getting their heap properties:
// ... assume Vulkan instance has been created successfully.
auto gpuCount = uint32_t{0};
vkEnumeratePhysicalDevices(instance, &gpuCount, nullptr);
auto devices = std::vector<VkPhysicalDevice>(gpuCount);
vkEnumeratePhysicalDevices(instance, &gpuCount, devices.data());
for (const auto& device : devices)
{
auto props = VkPhysicalDeviceProperties{};
vkGetPhysicalDeviceProperties(device, &props);
// Determine the type of the physical device
if (props.deviceType == VkPhysicalDeviceType::VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
{
// You've got yourself a discrete GPU. (ideal)
}
else if (props.deviceType == VkPhysicalDeviceType::VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU)
{
// You've got yourself an integrated GPU.
}
else
{
// I don't even...
}
// Determine the available device local memory.
auto memoryProps = VkPhysicalDeviceMemoryProperies{};
vkGetPhysicalDeviceMemoryProperties(device, &memoryProps);
auto heapsPointer = memoryProps.memoryHeaps;
auto heaps = std::vector<VkMemoryHeap>(heapsPointer, heapsPointer + memoryProps.memoryHeapCount);
for (const auto& heap : heaps)
{
if (heap.flags & VkMemoryHeapFlagBits::VK_MEMORY_HEAP_DEVICE_LOCAL_BIT)
{
// Device local heap, should be size of total GPU VRAM.
//heap.size will be the size of VRAM in bytes. (bigger is better)
}
}
}
Now, if you'll pardon the quick and dirty code; you could easily collect the available device local heaps of each discrete GPU and select the biggest one, I personally just select the first discrete GPU because it's a quite rare occurrence that someone with multiple discrete GPUs would have two very different performance level cards for gaming.
Update as of 7/23/2016: Nvidia's latest GeForce Driver 368.69 will actually expose multiple physical devices.
Up until now, this answer has only been theoretically functional as my multiple physical devices were not being exposed to Vulkan with the previous Nvidia drivers. Without needing to update the Vulkan API being utilized, the latest GeForce driver will now iterate and expose and utilize everything that the multiple physical devices can offer. I can confirm that this code works as expected now.