gfxstream: additional Goldfish logic for Android builds
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Goldfish needs a non-stub QEMU pipe stream and access
to the goldfish_sync device.

All of this logic may be deleted once qemu over
virtio-gpu is fully enabled.

TEST=run meson2hermetic + m vulkan.ranchu

Reviewed-by: Bo Hu <bohu@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40851>
This commit is contained in:
Gurchetan Singh 2026-04-07 17:47:47 -07:00 committed by Marge Bot
parent c7ab501171
commit f92cfe9a74
4 changed files with 22 additions and 5 deletions

View file

@ -6,10 +6,15 @@ inc_connection_manager = include_directories('.')
files_libconnection_manager = files(
'GfxStreamConnection.cpp',
'GfxStreamConnectionManager.cpp',
'QemuPipeStreamStub.cpp',
'VirtioGpuPipeStream.cpp',
)
if with_platform_android
files_libconnection_manager += files('QemuPipeStream.cpp')
else
files_libconnection_manager += files('QemuPipeStreamStub.cpp')
endif
libconnection_manager = static_library(
'connection_manager',
files_libconnection_manager,

View file

@ -46,9 +46,12 @@ gfxstream_guest_args += '-DVK_GRAPHICS_VERSION_1_4'
gfxstream_guest_args += '-DVK_COMPUTE_VERSION_1_4'
if with_gfxstream_emulated_android
gfxstream_guest_args += '-DEND2END_TESTS'
gfxstream_guest_args += '-DEND2END_TESTS'
endif
if with_platform_android
gfxstream_guest_args += '-DGFXSTREAM_ENABLE_GUEST_GOLDFISH'
endif
#====================================#
# Standard deps #

View file

@ -1,7 +1,13 @@
# Copyright 2022 Android Open Source Project
# SPDX-License-Identifier: MIT
subdir('stubs')
if with_platform_android
dep_gfxstream_stubs = null_dep
else
subdir('stubs')
endif
gfxstream_deps += dep_gfxstream_stubs
files_lib_vulkan_gfxstream = files(
'gfxstream_vk_cmd.cpp',
@ -35,7 +41,6 @@ lib_vulkan_gfxstream = shared_library(
inc_vulkan_headers,
inc_guest_iostream,
inc_vulkan_enc,
inc_gfxstream_vk_stubs,
inc_goldfish_address_space,
inc_include,
inc_src,
@ -44,7 +49,6 @@ lib_vulkan_gfxstream = shared_library(
inc_connection_manager,
],
link_with: [
libgfxstream_vk_stubs,
libvulkan_wsi,
libplatform_virtgpu,
libconnection_manager,

View file

@ -15,3 +15,8 @@ libgfxstream_vk_stubs = static_library(
inc_src,
],
)
dep_gfxstream_stubs = declare_dependency(
include_directories: [inc_gfxstream_vk_stubs],
link_with: [libgfxstream_vk_stubs],
)