diff --git a/src/libANGLE/renderer/vulkan/BUILD.gn b/src/libANGLE/renderer/vulkan/BUILD.gn index a1126990e..a976679d6 100644 --- a/src/libANGLE/renderer/vulkan/BUILD.gn +++ b/src/libANGLE/renderer/vulkan/BUILD.gn @@ -168,6 +168,9 @@ config("angle_vulkan_backend_config") { if (angle_enable_vulkan_gpu_trace_events) { defines += [ "ANGLE_ENABLE_VULKAN_GPU_TRACE_EVENTS=1" ] } + if (angle_enable_vulkan_validation_layers) { + defines += [ "ANGLE_ENABLE_VULKAN_VALIDATION_LAYERS" ] + } } angle_source_set("angle_vk_mem_alloc_wrapper") { diff --git a/src/tests/test_utils/ANGLETest.cpp b/src/tests/test_utils/ANGLETest.cpp index 9aa444a68..c82593dd3 100644 --- a/src/tests/test_utils/ANGLETest.cpp +++ b/src/tests/test_utils/ANGLETest.cpp @@ -365,10 +365,13 @@ ANGLETestBase::ANGLETestBase(const PlatformParameters ¶ms) PlatformParameters withMethods = params; withMethods.eglParameters.platformMethods = &gDefaultPlatformMethods; - // We don't build vulkan debug layers on Mac (http://anglebug.com/4376) - if (IsOSX() && withMethods.getRenderer() == EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE) + if (withMethods.getRenderer() == EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE) { +#if defined(ANGLE_ENABLE_VULKAN_VALIDATION_LAYERS) + withMethods.eglParameters.debugLayersEnabled = true; +#else withMethods.eglParameters.debugLayersEnabled = false; +#endif } auto iter = gFixtures.find(withMethods);