Commit 32bee0fd by Jamie Madill Committed by Commit Bot

Fix debug layers being disabled everywhere.

The define that controlled the debug layer preference was mistakenly checking a Vulkan define. When the Vulkan define was moved into the Vulkan back-end then the layers became disabled for all back-ends. Fix this by using a layered check in the Vulkan back-end and restoring the asserts enabled check to ShouldUseDebugLayers. Suppresses some tests that regressed the layers after they were broken. Bug: angleproject:3987 Bug: angleproject:3991 Change-Id: I6aafcff6d9e19866c2324663ef4d4550e97fcfb8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1852706Reviewed-by: 's avatarTobin Ehlis <tobine@google.com> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 4210e49b
...@@ -307,11 +307,11 @@ bool ShouldUseDebugLayers(const egl::AttributeMap &attribs) ...@@ -307,11 +307,11 @@ bool ShouldUseDebugLayers(const egl::AttributeMap &attribs)
attribs.get(EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED_ANGLE, EGL_DONT_CARE); attribs.get(EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED_ANGLE, EGL_DONT_CARE);
// Prefer to enable debug layers when available. // Prefer to enable debug layers when available.
#if defined(ANGLE_ENABLE_VULKAN_VALIDATION_LAYERS_BY_DEFAULT) #if defined(ANGLE_ENABLE_ASSERTS)
return (debugSetting != EGL_FALSE); return (debugSetting != EGL_FALSE);
#else #else
return (debugSetting == EGL_TRUE); return (debugSetting == EGL_TRUE);
#endif // defined(ANGLE_ENABLE_VULKAN_VALIDATION_LAYERS_BY_DEFAULT) #endif // defined(ANGLE_ENABLE_ASSERTS)
} }
bool ShouldUseVirtualizedContexts(const egl::AttributeMap &attribs, bool defaultValue) bool ShouldUseVirtualizedContexts(const egl::AttributeMap &attribs, bool defaultValue)
......
...@@ -513,6 +513,17 @@ void ChoosePhysicalDevice(const std::vector<VkPhysicalDevice> &physicalDevices, ...@@ -513,6 +513,17 @@ void ChoosePhysicalDevice(const std::vector<VkPhysicalDevice> &physicalDevices,
*physicalDeviceOut = physicalDevices[0]; *physicalDeviceOut = physicalDevices[0];
vkGetPhysicalDeviceProperties(*physicalDeviceOut, physicalDevicePropertiesOut); vkGetPhysicalDeviceProperties(*physicalDeviceOut, physicalDevicePropertiesOut);
} }
bool ShouldUseValidationLayers(const egl::AttributeMap &attribs)
{
#if defined(ANGLE_ENABLE_VULKAN_VALIDATION_LAYERS_BY_DEFAULT)
return ShouldUseDebugLayers(attribs);
#else
EGLAttrib debugSetting =
attribs.get(EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED_ANGLE, EGL_DONT_CARE);
return debugSetting == EGL_TRUE;
#endif // defined(ANGLE_ENABLE_VULKAN_VALIDATION_LAYERS_BY_DEFAULT)
}
} // namespace } // namespace
// RendererVk implementation. // RendererVk implementation.
...@@ -609,7 +620,7 @@ angle::Result RendererVk::initialize(DisplayVk *displayVk, ...@@ -609,7 +620,7 @@ angle::Result RendererVk::initialize(DisplayVk *displayVk,
{ {
mDisplay = display; mDisplay = display;
const egl::AttributeMap &attribs = mDisplay->getAttributeMap(); const egl::AttributeMap &attribs = mDisplay->getAttributeMap();
ScopedVkLoaderEnvironment scopedEnvironment(ShouldUseDebugLayers(attribs), ScopedVkLoaderEnvironment scopedEnvironment(ShouldUseValidationLayers(attribs),
ChooseICDFromAttribs(attribs)); ChooseICDFromAttribs(attribs));
#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(_WIN64) #if defined(ANGLE_PLATFORM_WINDOWS) && !defined(_WIN64)
// TODO: Re-enable validation layers on 32bit Windows // TODO: Re-enable validation layers on 32bit Windows
......
...@@ -575,6 +575,15 @@ ...@@ -575,6 +575,15 @@
3949 VULKAN : dEQP-GLES3.functional.shaders.texture_functions.texturesize.samplercubeshadow_vertex = SKIP 3949 VULKAN : dEQP-GLES3.functional.shaders.texture_functions.texturesize.samplercubeshadow_vertex = SKIP
3949 VULKAN : dEQP-GLES3.functional.shaders.texture_functions.texturesize.samplercubeshadow_fragment = SKIP 3949 VULKAN : dEQP-GLES3.functional.shaders.texture_functions.texturesize.samplercubeshadow_fragment = SKIP
// 2D array textureSize issuing validation error.
3991 VULKAN : dEQP-GLES3.functional.shaders.texture_functions.texturesize.isampler2darray_fragment = SKIP
3991 VULKAN : dEQP-GLES3.functional.shaders.texture_functions.texturesize.isampler2darray_vertex = SKIP
3991 VULKAN : dEQP-GLES3.functional.shaders.texture_functions.texturesize.sampler2darray_fixed_fragment = SKIP
3991 VULKAN : dEQP-GLES3.functional.shaders.texture_functions.texturesize.sampler2darray_fixed_vertex = SKIP
3991 VULKAN : dEQP-GLES3.functional.shaders.texture_functions.texturesize.sampler2darray_float_fragment = SKIP
3991 VULKAN : dEQP-GLES3.functional.shaders.texture_functions.texturesize.sampler2darray_float_vertex = SKIP
3991 VULKAN : dEQP-GLES3.functional.shaders.texture_functions.texturesize.usampler2darray_fragment = SKIP
3991 VULKAN : dEQP-GLES3.functional.shaders.texture_functions.texturesize.usampler2darray_vertex = SKIP
// Misc unimplemented: // Misc unimplemented:
......
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