mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
The SDL frontend previously only ever reported WindowInfo::Type::VulkanDirect and relied on VK_KHR_display to acquire the display. That fails when the frontend is launched inside a Wayland session, where a compositor owns the display (desktop, phone, or an embedded gamescope-style compositor). BuildWindowInfo() now checks WAYLAND_DISPLAY: when set, it brings up an SDL3 SDL_WINDOW_VULKAN window on the wayland video driver and hands its wl_display / wl_surface to the Vulkan backend as a Type::Wayland surface (the backend's vkCreateWaylandSurfaceKHR path already existed). Any failure logs a warning and falls through to the existing VK_KHR_display path, so bare kmsdrm devices are unaffected. The whole block is gated on WAYLAND_API. Enable WAYLAND_API in the clang-handheld preset so this path compiles. Pure kmsdrm targets without the ECM / Wayland-Egl headers can still build VulkanDirect-only via -DWAYLAND_API=OFF.
90 lines
3.4 KiB
JSON
90 lines
3.4 KiB
JSON
{
|
|
"version": 6,
|
|
"cmakeMinimumRequired": {
|
|
"major": 3,
|
|
"minor": 19,
|
|
"patch": 0
|
|
},
|
|
"configurePresets": [
|
|
{
|
|
"name": "clang-base",
|
|
"displayName": "Base",
|
|
"description": "Base preset for Clang. Only for inheriting from.",
|
|
"hidden": true,
|
|
"binaryDir": "${sourceDir}/build",
|
|
"generator": "Ninja",
|
|
"cacheVariables": {
|
|
"CMAKE_EXE_LINKER_FLAGS_INIT": "-fuse-ld=lld",
|
|
"CMAKE_MODULE_LINKER_FLAGS_INIT": "-fuse-ld=lld",
|
|
"CMAKE_SHARED_LINKER_FLAGS_INIT": "-fuse-ld=lld",
|
|
"CMAKE_C_COMPILER": "clang",
|
|
"CMAKE_CXX_COMPILER": "clang++"
|
|
}
|
|
},
|
|
{
|
|
"name": "ninja-multi",
|
|
"displayName": "Ninja Multi Config",
|
|
"description": "Generate multiple ninja build files.",
|
|
"inherits": "clang-base",
|
|
"generator": "Ninja Multi-Config"
|
|
},
|
|
{
|
|
"name": "clang-debug",
|
|
"displayName": "Clang Debug",
|
|
"description": "Debug build using ninja and clang.",
|
|
"inherits": "clang-base",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Debug"
|
|
}
|
|
},
|
|
{
|
|
"name": "clang-devel",
|
|
"displayName": "Clang Devel",
|
|
"description": "Developer build using ninja & clang.",
|
|
"inherits": "clang-base",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Devel"
|
|
}
|
|
},
|
|
{
|
|
"name": "clang-release",
|
|
"displayName": "Clang Release",
|
|
"description": "Release lto build using ninja & clang.",
|
|
"inherits": "clang-base",
|
|
"cacheVariables": {
|
|
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "ON",
|
|
"CMAKE_BUILD_TYPE": "Release",
|
|
"ENABLE_RECOMPILER_TEST_HOOKS": "OFF"
|
|
}
|
|
},
|
|
{
|
|
"name": "clang-perf",
|
|
"displayName": "Clang Devel + perf jitdump",
|
|
"description": "Devel build with USE_PERF_JITDUMP=ON; emits /tmp/pcsx2-perf-<pid>/jit-<pid>.dump for `perf inject --jit`.",
|
|
"inherits": "clang-devel",
|
|
"binaryDir": "${sourceDir}/build-perf",
|
|
"cacheVariables": {
|
|
"USE_PERF_JITDUMP": "ON"
|
|
}
|
|
},
|
|
{
|
|
"name": "clang-handheld",
|
|
"displayName": "Clang Handheld (SDL3 / kmsdrm)",
|
|
"description": "RelWithDebInfo build of the SDL3 frontend for handhelds. No Qt. Primary display path is VK_KHR_display (VulkanDirect, kmsdrm); WAYLAND_API is on so the SDL frontend can fall back to a Wayland Vulkan surface when launched inside a compositor. Requires ECM + Wayland-Egl dev headers on the build host — pure kmsdrm targets without them can build VulkanDirect-only by overriding -DWAYLAND_API=OFF.",
|
|
"inherits": "clang-base",
|
|
"binaryDir": "${sourceDir}/build-handheld",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
|
"ENABLE_QT_UI": "OFF",
|
|
"ENABLE_GSRUNNER": "ON",
|
|
"ENABLE_SDL_FRONTEND": "ON",
|
|
"ENABLE_TESTS": "OFF",
|
|
"ENABLE_RECOMPILER_TEST_HOOKS": "OFF",
|
|
"USE_BACKTRACE": "OFF",
|
|
"X11_API": "OFF",
|
|
"WAYLAND_API": "ON"
|
|
}
|
|
}
|
|
]
|
|
}
|