Commit c2234359 authored by Michael Spang's avatar Michael Spang Committed by Commit Bot

Revert "Enable VK_LAYER_LUNARG_standard_validation with VK_KHR_xlib_surface"

This reverts commit 0d06e98a.

Reason for revert: Causes a crash:

VUID_Undefined(ERROR / SPEC): msgNum: 0 - Instance Extension VK_KHR_xlib_surface is not supported by this layer.  Using this extension may adversely affect validation results and/or produce undefined behavior.
    Objects: 1
        [0] 0, type: 0, name: NULL
Received signal 11 SEGV_MAPERR 000000000040

Original change's description:
> Enable VK_LAYER_LUNARG_standard_validation with VK_KHR_xlib_surface
> 
> Tested it with vulkan-validationlayers-1.0.106
> 
> Bug: 843346
> Change-Id: I180d690421ede3251721452334e59b35c28f0d49
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1662534
> Commit-Queue: Peng Huang <penghuang@chromium.org>
> Auto-Submit: Peng Huang <penghuang@chromium.org>
> Reviewed-by: Jonathan Backer <backer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#669729}

TBR=penghuang@chromium.org,backer@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 843346
Change-Id: I5a164b461039cdf1805594fcff697a9e99e60714
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1665430Reviewed-by: default avatarMichael Spang <spang@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670283}
parent d40974b7
...@@ -148,26 +148,19 @@ bool VulkanInstance::Initialize( ...@@ -148,26 +148,19 @@ bool VulkanInstance::Initialize(
// TODO(crbug.com/843346): Make validation work in combination with // TODO(crbug.com/843346): Make validation work in combination with
// VK_KHR_xlib_surface or switch to VK_KHR_xcb_surface. // VK_KHR_xlib_surface or switch to VK_KHR_xcb_surface.
constexpr base::StringPiece xlib_surface_extension_name( const base::StringPiece xlib_surface_extension_name("VK_KHR_xlib_surface");
"VK_KHR_xlib_surface"); bool enable_validation =
bool require_xlib_surface_extension =
std::find_if(enabled_extensions.begin(), enabled_extensions.end(), std::find_if(enabled_extensions.begin(), enabled_extensions.end(),
[xlib_surface_extension_name](const char* e) { [xlib_surface_extension_name](const char* e) {
return xlib_surface_extension_name == e; return xlib_surface_extension_name == e;
}) != enabled_extensions.end(); }) == enabled_extensions.end();
if (enable_validation) {
// VK_LAYER_LUNARG_standard_validation 1.0.106 is required to support constexpr base::StringPiece standard_validation(
// VK_KHR_xlib_surface. "VK_LAYER_LUNARG_standard_validation");
constexpr base::StringPiece standard_validation( for (const VkLayerProperties& layer_property : instance_layers) {
"VK_LAYER_LUNARG_standard_validation"); if (standard_validation == layer_property.layerName)
for (const VkLayerProperties& layer_property : instance_layers) { enabled_layer_names.push_back(standard_validation.data());
if (standard_validation != layer_property.layerName)
continue;
if (!require_xlib_surface_extension ||
layer_property.specVersion >= VK_MAKE_VERSION(1, 0, 106)) {
enabled_layer_names.push_back(standard_validation.data());
} }
break;
} }
#endif // DCHECK_IS_ON() #endif // DCHECK_IS_ON()
......
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