mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 10:25:28 +00:00
Vulkan: Fallback to XCB for Xlib surfaces
Chromium builds the Vulkan loader without support Xlib (because it prefers XCB) which caused Xlib wgpu::SwapChain creation to fail on the Vulkan backend. This CL adds a fallback to use VK_KHR_xcb_surface if VK_KHR_xlib_surface isn't present. Bug: dawn:662 Change-Id: I0e0128ee6b5c75da03998dbae231d17e48bacc81 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41180 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org> Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
b0ca30280a
commit
fb0bf70459
@@ -162,6 +162,7 @@ namespace dawn_native { namespace vulkan {
|
||||
|
||||
#if defined(DAWN_USE_X11)
|
||||
# define VK_USE_PLATFORM_XLIB_KHR
|
||||
# define VK_USE_PLATFORM_XCB_KHR
|
||||
# include "common/xlib_with_undefs.h"
|
||||
#endif // defined(DAWN_USE_X11)
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
// This header includes <X11/Xlib.h> but removes all the extra defines that conflict with
|
||||
// identifiers in internal code. It should never be included in something that is part of the public
|
||||
// interface.
|
||||
#include <X11/Xlib-xcb.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#undef Success
|
||||
|
||||
Reference in New Issue
Block a user