Detect <xcb/shm.h> for building XCB surface support
Building with VK_USE_PLATFORM_XCB_KHR enabled requires the <xcb/shm.h>
header. Note that we dynamically check whether the MIT-SHM extension is
actually available on the target system before making use of it, but we
need the header to be present on the build machine. A warning about
installing the libxcb-shm0-dev package gets generated if it's not.
Also, the header include order was fixed and clang-format reapplied.
Bug: b/209030951
Change-Id: I6a6889c9ee64e3b8aa2a56a15a3aeff534268638
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/64950
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/WSI/libXCB.cpp b/src/WSI/libXCB.cpp
index 60be41e..212884c 100644
--- a/src/WSI/libXCB.cpp
+++ b/src/WSI/libXCB.cpp
@@ -54,7 +54,7 @@
libxcb = RTLD_DEFAULT;
}
else
- {
+ {
libxcb = loadLibrary("libxcb.so.1");
}
@@ -63,7 +63,7 @@
libshm = RTLD_DEFAULT;
}
else
- {
+ {
libshm = loadLibrary("libxcb-shm.so.0");
}