Skip to content

Commit fd1db54

Browse files
author
George Wright
authored
Use VK_LAYER_KHRONOS_validation only on Fuchsia (flutter#17683)
1 parent 4a1085a commit fd1db54

File tree

2 files changed

+7
-51
lines changed

2 files changed

+7
-51
lines changed

tools/fuchsia/fuchsia_libs.gni

Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -72,63 +72,22 @@ common_libs = [
7272

7373
vulkan_dist = "$fuchsia_sdk_base/dist"
7474

75+
# Note that the other validation libraries in the Fuchsia SDK seem to have a bug right
76+
# now causing crashes, so it is only recommended that we use
77+
# VkLayer_khronos_validation.so until we have a confirmation that they are fixed.
7578
vulkan_validation_libs = [
76-
{
77-
name = "VkLayer_core_validation.so"
78-
path = rebase_path("$vulkan_dist")
79-
},
8079
{
8180
name = "VkLayer_khronos_validation.so"
8281
path = rebase_path("$vulkan_dist")
8382
},
84-
{
85-
name = "VkLayer_object_lifetimes.so"
86-
path = rebase_path("$vulkan_dist")
87-
},
88-
{
89-
name = "VkLayer_stateless_validation.so"
90-
path = rebase_path("$vulkan_dist")
91-
},
92-
{
93-
name = "VkLayer_thread_safety.so"
94-
path = rebase_path("$vulkan_dist")
95-
},
96-
{
97-
name = "VkLayer_unique_objects.so"
98-
path = rebase_path("$vulkan_dist")
99-
},
10083
]
10184

10285
vulkan_data_dir =
10386
"//fuchsia/sdk/linux/pkg/vulkan_layers/data/vulkan/explicit_layer.d"
10487

10588
vulkan_icds = [
106-
{
107-
path = rebase_path("$vulkan_data_dir/VkLayer_core_validation.json")
108-
dest = "vulkan/explicit_layer.d/VkLayer_core_validation.json"
109-
},
110-
{
111-
path = rebase_path("$vulkan_data_dir/VkLayer_object_lifetimes.json")
112-
dest = "vulkan/explicit_layer.d/VkLayer_object_lifetimes.json"
113-
},
114-
{
115-
path = rebase_path("$vulkan_data_dir/VkLayer_thread_safety.json")
116-
dest = "vulkan/explicit_layer.d/VkLayer_thread_safety.json"
117-
},
118-
{
119-
path = rebase_path("$vulkan_data_dir/VkLayer_stateless_validation.json")
120-
dest = "vulkan/explicit_layer.d/VkLayer_stateless_validation.json"
121-
},
122-
{
123-
path = rebase_path("$vulkan_data_dir/VkLayer_unique_objects.json")
124-
dest = "vulkan/explicit_layer.d/VkLayer_unique_objects.json"
125-
},
12689
{
12790
path = rebase_path("$vulkan_data_dir/VkLayer_khronos_validation.json")
12891
dest = "vulkan/explicit_layer.d/VkLayer_khronos_validation.json"
12992
},
130-
{
131-
path = rebase_path("$vulkan_data_dir/VkLayer_standard_validation.json")
132-
dest = "vulkan/explicit_layer.d/VkLayer_standard_validation.json"
133-
},
13493
]

vulkan/vulkan_utilities.cc

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,10 @@ static std::vector<std::string> InstanceOrDeviceLayersToEnable(
4343
// NOTE: The loader is sensitive to the ordering here. Please do not rearrange
4444
// this list.
4545
#if OS_FUCHSIA
46-
// Fuchsia uses the updated Vulkan loader and validation layers which no
47-
// longer includes the image validation layer.
48-
const std::vector<std::string> candidates = {
49-
"VK_LAYER_GOOGLE_threading", "VK_LAYER_LUNARG_parameter_validation",
50-
"VK_LAYER_LUNARG_object_tracker", "VK_LAYER_LUNARG_core_validation",
51-
"VK_LAYER_LUNARG_device_limits", "VK_LAYER_LUNARG_swapchain",
52-
"VK_LAYER_GOOGLE_unique_objects"};
46+
// The other layers in the Fuchsia SDK seem to have a bug right now causing
47+
// crashes, so it is only recommended that we use VK_LAYER_KHRONOS_validation
48+
// until we have a confirmation that they are fixed.
49+
const std::vector<std::string> candidates = {"VK_LAYER_KHRONOS_validation"};
5350
#else
5451
const std::vector<std::string> candidates = {
5552
"VK_LAYER_GOOGLE_threading", "VK_LAYER_LUNARG_parameter_validation",

0 commit comments

Comments
 (0)