From 8abbe2836bb49faba8a97e2df59058290e1c385a Mon Sep 17 00:00:00 2001 From: Shahbaz Youssefi Date: Tue, 6 Feb 2024 14:44:39 -0500 Subject: [PATCH] Vulkan: Get rid of X11 include in DisplayVkXcb.cpp Bug: angleproject:8520 Change-Id: Iaa251b0ba2858873b8d22e8f9e5dae7a2567c95e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5273489 Reviewed-by: Geoff Lang Auto-Submit: Shahbaz Youssefi Commit-Queue: Shahbaz Youssefi Commit-Queue: Geoff Lang --- BUILD.gn | 1 + src/libANGLE/renderer/gl/glx/DisplayGLX.cpp | 2 +- src/libANGLE/renderer/vulkan/linux/xcb/DisplayVkXcb.cpp | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 1dc20fa1b43..4955034c60f 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -647,6 +647,7 @@ angle_static_library("angle_gpu_info_util") { if (angle_use_x11 && angle_has_build) { sources += libangle_gpu_info_util_x11_sources deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ] + libs += [ "xcb-util" ] defines += [ "GPU_INFO_USE_X11" ] libs += [ "X11", diff --git a/src/libANGLE/renderer/gl/glx/DisplayGLX.cpp b/src/libANGLE/renderer/gl/glx/DisplayGLX.cpp index 6bc2055332c..f95d6314337 100644 --- a/src/libANGLE/renderer/gl/glx/DisplayGLX.cpp +++ b/src/libANGLE/renderer/gl/glx/DisplayGLX.cpp @@ -749,7 +749,7 @@ egl::Error DisplayGLX::waitClient(const gl::Context *context) egl::Error DisplayGLX::waitNative(const gl::Context *context, EGLint engine) { - // eglWaitNative is used to notice the driver of changes in X11 for the current surface, such as + // eglWaitNative is used to notify the driver of changes in X11 for the current surface, such as // changes of the window size. We use this event to update the child window of WindowSurfaceGLX // to match its parent window's size. // Handling eglWaitNative this way helps the application control when resize happens. This is diff --git a/src/libANGLE/renderer/vulkan/linux/xcb/DisplayVkXcb.cpp b/src/libANGLE/renderer/vulkan/linux/xcb/DisplayVkXcb.cpp index e96b3decca0..ae69a8179d5 100644 --- a/src/libANGLE/renderer/vulkan/linux/xcb/DisplayVkXcb.cpp +++ b/src/libANGLE/renderer/vulkan/linux/xcb/DisplayVkXcb.cpp @@ -9,8 +9,8 @@ #include "libANGLE/renderer/vulkan/linux/xcb/DisplayVkXcb.h" -#include #include +#include #include "common/system_utils.h" #include "libANGLE/Display.h" @@ -157,7 +157,7 @@ DisplayImpl *CreateVulkanXcbDisplay(const egl::DisplayState &state) angle::Result DisplayVkXcb::waitNativeImpl() { - XSync(reinterpret_cast(mState.displayId), False); + xcb_aux_sync(mXcbConnection); return angle::Result::Continue; } } // namespace rx