Commit c8ac2e2a authored by Chris Blume's avatar Chris Blume Committed by Commit Bot

Reenable Vulkan validation

The Vulkan validation layer used to error when a platform-specific
surface (in this case, a X11 surface) was used.

A build flag which enables the validation layer to recognize that
platform-specific surface was missing.

When the Vulkan validation layers moved to ANGLE they also added this
build flag. As a result, we can re-enable the validation layers on X11.

BUG=843346

Change-Id: Ifb634a60a1cd9698b5cf51e03b426a58b4387a5d
Reviewed-on: https://chromium-review.googlesource.com/c/1300335Reviewed-by: default avatarEric Karl <ericrk@chromium.org>
Commit-Queue: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602961}
parent b7b041c4
......@@ -48,6 +48,10 @@ if (enable_vulkan) {
"//ui/gfx",
]
if (use_x11) {
deps += [ "//third_party/angle/third_party/vulkan-validation-layers:vulkan_validation_layers" ]
}
data_deps = []
if (is_fuchsia) {
data_deps += [ "//third_party/fuchsia-sdk:vulkan_layers" ]
......
......@@ -113,9 +113,7 @@ bool VulkanInstance::Initialize(
}
std::unordered_set<std::string> desired_layers({
#if !defined(USE_X11) && !defined(USE_OZONE)
// TODO(crbug.com/843346): Make validation work in combination with
// VK_KHR_xlib_surface or switch to VK_KHR_xcb_surface.
#if defined(USE_X11) && !defined(USE_OZONE)
"VK_LAYER_LUNARG_standard_validation",
#endif
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment