Commit 2add8d9f by Yuly Novikov Committed by Angle LUCI CQ

Don't use VK_EXT_debug_utils with non-Android Vulkan < 1.1.91

Due to a bug in Vulkan Loader < 1.1.91 https://github.com/KhronosGroup/Vulkan-Loader/pull/95 Bug: chromium:1205999 Change-Id: Icdedc2e80abe3c5578e811759f66ddbb71abb2ec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2907095Reviewed-by: 's avatarIan Elliott <ianelliott@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
parent 26973584
...@@ -837,9 +837,20 @@ angle::Result RendererVk::initialize(DisplayVk *displayVk, ...@@ -837,9 +837,20 @@ angle::Result RendererVk::initialize(DisplayVk *displayVk,
const char *wsiExtension, const char *wsiExtension,
const char *wsiLayer) const char *wsiLayer)
{ {
bool canLoadDebugUtils = true;
#if defined(ANGLE_SHARED_LIBVULKAN) #if defined(ANGLE_SHARED_LIBVULKAN)
// Set all vk* function ptrs // Set all vk* function ptrs
ANGLE_VK_TRY(displayVk, volkInitialize()); ANGLE_VK_TRY(displayVk, volkInitialize());
uint32_t ver = volkGetInstanceVersion();
if (!IsAndroid() && VK_API_VERSION_MAJOR(ver) == 1 &&
(VK_API_VERSION_MINOR(ver) < 1 ||
(VK_API_VERSION_MINOR(ver) == 1 && VK_API_VERSION_PATCH(ver) < 91)))
{
// http://crbug.com/1205999 - non-Android Vulkan Loader versions before 1.1.91 have a bug
// which prevents loading VK_EXT_debug_utils function pointers.
canLoadDebugUtils = false;
}
#endif // defined(ANGLE_SHARED_LIBVULKAN) #endif // defined(ANGLE_SHARED_LIBVULKAN)
mDisplay = display; mDisplay = display;
...@@ -928,7 +939,7 @@ angle::Result RendererVk::initialize(DisplayVk *displayVk, ...@@ -928,7 +939,7 @@ angle::Result RendererVk::initialize(DisplayVk *displayVk,
vk::ExtensionNameList enabledInstanceExtensions; vk::ExtensionNameList enabledInstanceExtensions;
enabledInstanceExtensions.push_back(VK_KHR_SURFACE_EXTENSION_NAME); enabledInstanceExtensions.push_back(VK_KHR_SURFACE_EXTENSION_NAME);
enabledInstanceExtensions.push_back(wsiExtension); enabledInstanceExtensions.push_back(wsiExtension);
mEnableDebugUtils = mEnableValidationLayers && mEnableDebugUtils = canLoadDebugUtils && mEnableValidationLayers &&
ExtensionFound(VK_EXT_DEBUG_UTILS_EXTENSION_NAME, instanceExtensionNames); ExtensionFound(VK_EXT_DEBUG_UTILS_EXTENSION_NAME, instanceExtensionNames);
bool enableDebugReport = bool enableDebugReport =
......
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