Skip to content

Commit

Permalink
Update to match the latest Vulkan loader in Fuchsia (flutter#3654)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejurka authored May 8, 2017
1 parent bf2166b commit 15cb187
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vulkan/vulkan_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down
10 changes: 10 additions & 0 deletions vulkan/vulkan_utilities.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 15cb187

Please sign in to comment.