gfxstream: guest: add XCB Surface support

This is needed to run X11 apps via libvulkan_gfxstream.so

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This commit is contained in:
Gurchetan Singh
2024-06-21 13:43:07 -07:00
committed by Marge Bot
parent 7406c49842
commit 7dca2000ad
2 changed files with 14 additions and 2 deletions

View File

@@ -43,8 +43,11 @@ static struct vk_instance_extension_table gfxstream_vk_instance_extensions_suppo
// Provided by Mesa components only; never encoded/decoded through gfxstream
static const char* const kMesaOnlyInstanceExtension[] = {
VK_KHR_SURFACE_EXTENSION_NAME,
#if defined(LINUX_GUEST_BUILD)
#if defined(GFXSTREAM_VK_WAYLAND)
VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME,
#endif
#if defined(GFXSTREAM_VK_X11)
VK_KHR_XCB_SURFACE_EXTENSION_NAME,
#endif
VK_EXT_DEBUG_UTILS_EXTENSION_NAME,
};

View File

@@ -7,10 +7,19 @@ files_lib_vulkan_gfxstream = files(
'gfxstream_vk_wsi.cpp'
)
gfxstream_vk_wsi_args = []
if with_platform_x11
gfxstream_vk_wsi_args += '-DGFXSTREAM_VK_X11'
endif
if with_platform_wayland
gfxstream_vk_wsi_args += '-DGFXSTREAM_VK_WAYLAND'
endif
lib_vulkan_gfxstream = shared_library(
'vulkan_gfxstream',
files_lib_vulkan_gfxstream + files_lib_vulkan_enc + gfxstream_vk_entrypoints,
cpp_args: gfxstream_guest_args,
cpp_args: gfxstream_guest_args + gfxstream_vk_wsi_args,
include_directories: [inc_vulkan_headers, inc_opengl_headers, inc_android_emu,
inc_android_compat, inc_opengl_system, inc_guest_iostream,
inc_opengl_codec, inc_render_enc, inc_vulkan_enc, inc_platform,