mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 05:10:11 +01:00
mesa: add option to enable virtgpu_kumquat FFI for gfxstream
Will be used by Cuttlefish CI/CD, but also commonly used by gfxstream developers. meson setup gfxstream-build -Dvulkan-drivers="gfxstream" -Dgallium-drivers="" -Dvirtgpu_kumquat=true -Dopengl=false -Drust_std=2021 In distros, virtgpu_kumquat is not expected to be packaged since it is a CI/CD tool. Reviewed-by: Aaron Ruby <aruby@qnx.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
This commit is contained in:
parent
f2b07903ab
commit
f7a9991b89
6 changed files with 19 additions and 20 deletions
|
|
@ -736,7 +736,8 @@ if with_gallium_rusticl
|
|||
endif
|
||||
endif
|
||||
|
||||
if with_gallium_rusticl or with_nouveau_vk or with_tools.contains('etnaviv')
|
||||
with_virtgpu_kumquat = get_option('virtgpu_kumquat') and with_gfxstream_vk
|
||||
if with_gallium_rusticl or with_nouveau_vk or with_tools.contains('etnaviv') or with_virtgpu_kumquat
|
||||
# rust.bindgen() does not pass `--rust-target` to bindgen until 1.7.0.
|
||||
if meson.version().version_compare('< 1.7.0')
|
||||
error('Mesa Rust support requires Meson 1.7.0 or newer')
|
||||
|
|
|
|||
|
|
@ -840,3 +840,10 @@ option(
|
|||
],
|
||||
description : 'Allows the fallback mechanism if the dependency is not available on the system, or too old.'
|
||||
)
|
||||
|
||||
option(
|
||||
'virtgpu_kumquat',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Build virtgpu_kumquat (only useful with gfxstream currently)'
|
||||
)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,6 @@ endif
|
|||
# Include the gfxstream private VkStructureType definitions
|
||||
gfxstream_guest_args += '-DVK_GFXSTREAM_STRUCTURE_TYPE_EXT'
|
||||
|
||||
#===============#
|
||||
# Dependencies #
|
||||
#===============#
|
||||
|
||||
with_kumquat = false
|
||||
virtgpu_kumquat_dep = dependency('virtgpu_kumquat_ffi', required: false)
|
||||
if virtgpu_kumquat_dep.found()
|
||||
with_kumquat = true
|
||||
endif
|
||||
|
||||
#===============#
|
||||
# Includes #
|
||||
#===============#
|
||||
|
|
|
|||
|
|
@ -8,12 +8,7 @@
|
|||
#include "GfxStreamVulkanMapper.h"
|
||||
#include "VirtGpu.h"
|
||||
|
||||
// Blueprint and Meson builds place things differently
|
||||
#if defined(ANDROID)
|
||||
#include "virtgpu_kumquat_ffi.h"
|
||||
#else
|
||||
#include "virtgpu_kumquat/virtgpu_kumquat_ffi.h"
|
||||
#endif
|
||||
|
||||
class VirtGpuKumquatResource : public std::enable_shared_from_this<VirtGpuKumquatResource>,
|
||||
public VirtGpuResource {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright 2022 Android Open Source Project
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if with_kumquat
|
||||
if with_virtgpu_kumquat
|
||||
files_libplatform_virtgpu_kumquat = files(
|
||||
'VirtGpuKumquatDevice.cpp',
|
||||
'VirtGpuKumquatBlobMapping.cpp',
|
||||
|
|
@ -17,7 +17,7 @@ libplatform_virtgpu_kumquat = static_library(
|
|||
files_libplatform_virtgpu_kumquat,
|
||||
cpp_args: gfxstream_guest_args,
|
||||
include_directories: [inc_platform_virtgpu, inc_src, inc_gfxstream_vulkan_mapper,
|
||||
inc_vulkan_util, inc_include],
|
||||
link_with: [libgfxstream_vulkan_mapper],
|
||||
dependencies: [idep_vulkan_util_headers, virtgpu_kumquat_dep],
|
||||
inc_vulkan_util, inc_include, inc_virtgpu_kumquat_ffi],
|
||||
link_with: [libgfxstream_vulkan_mapper, libvirtgpu_kumquat_ffi],
|
||||
dependencies: [idep_vulkan_util_headers],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -100,6 +100,12 @@ if with_any_nouveau
|
|||
subdir('nouveau')
|
||||
endif
|
||||
if with_gfxstream_vk
|
||||
if with_virtgpu_kumquat
|
||||
subdir('util/rust')
|
||||
subdir('virtio/protocols')
|
||||
subdir('virtio/virtgpu_kumquat')
|
||||
subdir('virtio/virtgpu_kumquat_ffi')
|
||||
endif
|
||||
subdir('gfxstream')
|
||||
endif
|
||||
if with_gallium_asahi or with_asahi_vk or with_tools.contains('asahi')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue