From 15cb187cc943019f5d01d6fea7f5084dd265eaee Mon Sep 17 00:00:00 2001 From: mikejurka Date: Mon, 8 May 2017 12:58:17 -0700 Subject: [PATCH] Update to match the latest Vulkan loader in Fuchsia (#3654) --- vulkan/vulkan_interface.cc | 4 ++++ vulkan/vulkan_utilities.cc | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/vulkan/vulkan_interface.cc b/vulkan/vulkan_interface.cc index 13a4a421afcdc..a3896090f91bd 100644 --- a/vulkan/vulkan_interface.cc +++ b/vulkan/vulkan_interface.cc @@ -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"; } diff --git a/vulkan/vulkan_utilities.cc b/vulkan/vulkan_utilities.cc index eedda2af039cc..2a5dcd47a8f3d 100644 --- a/vulkan/vulkan_utilities.cc +++ b/vulkan/vulkan_utilities.cc @@ -30,11 +30,21 @@ static std::vector 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 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 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;