1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
--- a/third_party/swiftshader/src/Vulkan/BUILD.gn
+++ b/third_party/swiftshader/src/Vulkan/BUILD.gn
@@ -16,14 +16,22 @@ import("//build_overrides/build.gni")
import("../swiftshader.gni")
import("vulkan.gni")
+if (is_linux) {
+ import("//build/config/ozone.gni")
+}
+
# Need a separate config to ensure the warnings are added to the end.
config("swiftshader_libvulkan_private_config") {
if (is_linux) {
defines = [
"VK_USE_PLATFORM_XCB_KHR",
- "VK_USE_PLATFORM_WAYLAND_KHR",
"VK_EXPORT=__attribute__((visibility(\"default\")))",
]
+ if (ozone_platform_wayland) {
+ defines += [
+ "VK_USE_PLATFORM_WAYLAND_KHR",
+ ]
+ }
} else if (is_chromeos) {
defines = [
"VK_EXPORT=__attribute__((visibility(\"default\")))",
--- a/third_party/swiftshader/src/WSI/BUILD.gn
+++ b/third_party/swiftshader/src/WSI/BUILD.gn
@@ -42,15 +42,19 @@ swiftshader_source_set("WSI") {
if (is_linux) {
sources += [
- "WaylandSurfaceKHR.cpp",
- "WaylandSurfaceKHR.hpp",
"XcbSurfaceKHR.cpp",
"XcbSurfaceKHR.hpp",
- "libWaylandClient.cpp",
- "libWaylandClient.hpp",
"libXCB.cpp",
"libXCB.hpp",
]
+ if (ozone_platform_wayland) {
+ sources += [
+ "WaylandSurfaceKHR.cpp",
+ "WaylandSurfaceKHR.hpp",
+ "libWaylandClient.cpp",
+ "libWaylandClient.hpp",
+ ]
+ }
}
if (is_win) {
|