Upstream-Status: Pending
|
|
Signed-off-by: Maksim Sisov <msisov@igalia.com>
|
---
|
From 77393e5d862f52bfc1ead8f855dde79d6b412bec Mon Sep 17 00:00:00 2001
|
From: Maksim Sisov <msisov@igalia.com>
|
Date: Tue, 28 Sep 2021 09:12:30 +0300
|
Subject: [PATCH] ozone/wayland: don't build xcb for pure wayland builds.
|
|
Swiftshader assumes is_linux == x11, but it's no longer true
|
after Ozone became default on Linux.
|
---
|
third_party/swiftshader/src/Vulkan/BUILD.gn | 3 ++-
|
third_party/swiftshader/src/WSI/BUILD.gn | 3 ++-
|
2 files changed, 4 insertions(+), 2 deletions(-)
|
|
diff --git a/third_party/swiftshader/src/Vulkan/BUILD.gn b/third_party/swiftshader/src/Vulkan/BUILD.gn
|
index 1612e1a33..bfad5f6c3 100644
|
--- a/third_party/swiftshader/src/Vulkan/BUILD.gn
|
+++ b/third_party/swiftshader/src/Vulkan/BUILD.gn
|
@@ -13,12 +13,13 @@
|
# limitations under the License.
|
|
import("//build_overrides/build.gni")
|
+import("//build/config/ozone.gni")
|
import("../swiftshader.gni")
|
import("vulkan.gni")
|
|
# Need a separate config to ensure the warnings are added to the end.
|
config("swiftshader_libvulkan_private_config") {
|
- if (is_linux || is_chromeos) {
|
+ if ((is_linux || is_chromeos) && ozone_platform_x11) {
|
defines = [
|
"VK_USE_PLATFORM_XLIB_KHR",
|
"VK_USE_PLATFORM_XCB_KHR",
|
diff --git a/third_party/swiftshader/src/WSI/BUILD.gn b/third_party/swiftshader/src/WSI/BUILD.gn
|
index 248ba315b..995d52479 100644
|
--- a/third_party/swiftshader/src/WSI/BUILD.gn
|
+++ b/third_party/swiftshader/src/WSI/BUILD.gn
|
@@ -12,6 +12,7 @@
|
# See the License for the specific language governing permissions and
|
# limitations under the License.
|
|
+import("//build/config/ozone.gni")
|
import("../swiftshader.gni")
|
|
config("WSI_metal_weak_framework") {
|
@@ -33,7 +34,7 @@ swiftshader_source_set("WSI") {
|
"VkSwapchainKHR.hpp",
|
]
|
|
- if (is_linux || is_chromeos) {
|
+ if ((is_linux || is_chromeos) && ozone_platform_x11) {
|
sources += [
|
"XcbSurfaceKHR.cpp",
|
"XcbSurfaceKHR.hpp",
|
--
|
2.25.1
|