Update to match the latest Vulkan loader in Fuchsia (#3654)

This commit is contained in:
mikejurka 2017-05-08 12:58:17 -07:00 committed by GitHub
parent bf2166b659
commit 15cb187cc9
2 changed files with 14 additions and 0 deletions

View File

@ -62,6 +62,10 @@ std::string VulkanResultToString(VkResult result) {
return "VK_RESULT_RANGE_SIZE";
case VK_RESULT_MAX_ENUM:
return "VK_RESULT_MAX_ENUM";
case VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX:
return "VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX";
case VK_ERROR_OUT_OF_POOL_MEMORY_KHR:
return "VK_ERROR_OUT_OF_POOL_MEMORY_KHR";
}
return "Unknown Error";
}

View File

@ -30,11 +30,21 @@ static std::vector<std::string> InstanceOrDeviceLayersToEnable(
// NOTE: The loader is sensitive to the ordering here. Please do not rearrange
// this list.
#if OS_FUCHSIA
// Fuchsia uses the updated Vulkan loader and validation layers which no
// longer includes the image validation layer.
const std::vector<std::string> candidates = {
"VK_LAYER_GOOGLE_threading", "VK_LAYER_LUNARG_parameter_validation",
"VK_LAYER_LUNARG_object_tracker", "VK_LAYER_LUNARG_core_validation",
"VK_LAYER_LUNARG_device_limits", "VK_LAYER_LUNARG_swapchain",
"VK_LAYER_GOOGLE_unique_objects"};
#else
const std::vector<std::string> candidates = {
"VK_LAYER_GOOGLE_threading", "VK_LAYER_LUNARG_parameter_validation",
"VK_LAYER_LUNARG_object_tracker", "VK_LAYER_LUNARG_core_validation",
"VK_LAYER_LUNARG_device_limits", "VK_LAYER_LUNARG_image",
"VK_LAYER_LUNARG_swapchain", "VK_LAYER_GOOGLE_unique_objects"};
#endif
uint32_t count = 0;