Vulkan: Fix some missing switch warnings.

Might as well prefer a virtual GPU over a CPU maybe...
This commit is contained in:
Unknown W. Brackets 2018-06-17 11:30:22 -07:00
parent d1fa9b97a3
commit e4127890ec
3 changed files with 9 additions and 1 deletions

View file

@ -444,12 +444,17 @@ int VulkanContext::GetBestPhysicalDevice() {
case VK_PHYSICAL_DEVICE_TYPE_CPU:
score += 1;
break;
case VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU:
score += 2;
break;
case VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU:
score += 20;
break;
case VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU:
score += 10;
break;
default:
break;
}
if (props.vendorID == VULKAN_VENDOR_AMD) {
score += 5;

View file

@ -313,6 +313,8 @@ bool VulkanMayBeAvailable() {
case VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU:
anyGood = true;
break;
default:
break;
}
// TODO: Should also check queuefamilyproperties for a GRAPHICS queue family? Oh well.
}

View file

@ -104,8 +104,9 @@ bool DoesBackendSupportHWTess() {
case GPUBackend::VULKAN:
case GPUBackend::DIRECT3D11:
return true;
default:
return false;
}
return false;
}
static std::string PostShaderTranslateName(const char *value) {