Commit 57e9b386 authored by Peng Huang's avatar Peng Huang Committed by Commit Bot

Fix vulkan_context_browsertests and vulkan_pixel_skia_gold_test

Fix the problem by check correct x11 extension for proprietary
drivers.

Bug: 1063497
Change-Id: Ib382774d7ac1bdd7aee0ccf63c095c101dbc4491
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2113707Reviewed-by: default avatarMaggie Chen <magchen@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752292}
parent c4659dbc
......@@ -26,11 +26,20 @@ namespace gpu {
namespace {
bool IsVulkanSurfaceSupported() {
static const char* extensions[] = {
"DRI3", // open source driver.
"ATIFGLRXDRI", // AMD proprietary driver.
"NV-CONTROL", // NVidia proprietary driver.
};
auto* display = gfx::GetXDisplay();
int ext_code, first_event, first_error;
// Vulkan surface is supported via DRI3.
return XQueryExtension(display, "DRI3", &ext_code, &first_event,
&first_error);
for (const auto* extension : extensions) {
if (XQueryExtension(display, extension, &ext_code, &first_event,
&first_error)) {
return true;
}
}
return false;
}
class ScopedUnsetDisplay {
......
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