Commit e1ab9e9b authored by Peng Huang's avatar Peng Huang Committed by Commit Bot

Vulkan: fix vulkan external object broken with --use-vulkan=native

With the this change, the https://crbug.com/1014236 will not be
reproducible with Nvidia.

Bug: 1014236
Change-Id: If6a82f7e797bca2c726359575a2134f206ae72fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879749
Commit-Queue: Peng Huang <penghuang@chromium.org>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Auto-Submit: Peng Huang <penghuang@chromium.org>
Reviewed-by: default avatarVasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709180}
parent ba94d581
...@@ -254,11 +254,15 @@ bool SharedContextState::InitializeGL( ...@@ -254,11 +254,15 @@ bool SharedContextState::InitializeGL(
MakeCurrent(nullptr); MakeCurrent(nullptr);
} }
bool is_native_vulkan =
gpu_preferences.use_vulkan == gpu::VulkanImplementationName::kNative ||
gpu_preferences.use_vulkan ==
gpu::VulkanImplementationName::kForcedNative;
// Swiftshader GL and Vulkan report supporting external objects extensions, // Swiftshader GL and Vulkan report supporting external objects extensions,
// but they don't. // but they don't.
support_vulkan_external_object_ = support_vulkan_external_object_ =
!gl::g_current_gl_version->is_swiftshader && !gl::g_current_gl_version->is_swiftshader && is_native_vulkan &&
gpu_preferences.use_vulkan == gpu::VulkanImplementationName::kNative &&
gl::g_current_gl_driver->ext.b_GL_EXT_memory_object_fd && gl::g_current_gl_driver->ext.b_GL_EXT_memory_object_fd &&
gl::g_current_gl_driver->ext.b_GL_EXT_semaphore_fd; gl::g_current_gl_driver->ext.b_GL_EXT_semaphore_fd;
......
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