mesa: add gfxstream-experimental to -Dvulkan-drivers
This adds gfxstream-vk as a vulkan driver to Mesa. It will be used in the following places: - Android Emulator - Fuchsia Emulator - Cloud Android - AAOS reference hardware - [a few other places] meson amd64-build/ -Dvulkan-drivers="gfxstream-experimental" -Dgallium-drivers="" -Dopengl=false 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:

committed by
Marge Bot

parent
889459e788
commit
5af81ed7c5
@@ -242,7 +242,7 @@ elif _vulkan_drivers.contains('all')
|
|||||||
_vulkan_drivers = ['amd', 'intel', 'intel_hasvk', 'swrast',
|
_vulkan_drivers = ['amd', 'intel', 'intel_hasvk', 'swrast',
|
||||||
'freedreno', 'panfrost', 'virtio', 'broadcom',
|
'freedreno', 'panfrost', 'virtio', 'broadcom',
|
||||||
'imagination-experimental', 'microsoft-experimental',
|
'imagination-experimental', 'microsoft-experimental',
|
||||||
'nouveau', 'asahi']
|
'nouveau', 'asahi', 'gfxstream-experimental']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
with_intel_vk = _vulkan_drivers.contains('intel')
|
with_intel_vk = _vulkan_drivers.contains('intel')
|
||||||
@@ -258,6 +258,7 @@ with_imagination_srv = get_option('imagination-srv')
|
|||||||
with_microsoft_vk = _vulkan_drivers.contains('microsoft-experimental')
|
with_microsoft_vk = _vulkan_drivers.contains('microsoft-experimental')
|
||||||
with_nouveau_vk = _vulkan_drivers.contains('nouveau')
|
with_nouveau_vk = _vulkan_drivers.contains('nouveau')
|
||||||
with_asahi_vk = _vulkan_drivers.contains('asahi')
|
with_asahi_vk = _vulkan_drivers.contains('asahi')
|
||||||
|
with_gfxstream_vk = _vulkan_drivers.contains('gfxstream-experimental')
|
||||||
with_any_vk = _vulkan_drivers.length() != 0
|
with_any_vk = _vulkan_drivers.length() != 0
|
||||||
|
|
||||||
if with_any_vk and host_machine.system() == 'windows' and meson.version().version_compare('< 1.3')
|
if with_any_vk and host_machine.system() == 'windows' and meson.version().version_compare('< 1.3')
|
||||||
|
@@ -205,7 +205,8 @@ option(
|
|||||||
value : ['auto'],
|
value : ['auto'],
|
||||||
choices : ['auto', 'amd', 'broadcom', 'freedreno', 'intel', 'intel_hasvk',
|
choices : ['auto', 'amd', 'broadcom', 'freedreno', 'intel', 'intel_hasvk',
|
||||||
'panfrost', 'swrast', 'virtio', 'imagination-experimental',
|
'panfrost', 'swrast', 'virtio', 'imagination-experimental',
|
||||||
'microsoft-experimental', 'nouveau', 'asahi', 'all'],
|
'microsoft-experimental', 'nouveau', 'asahi',
|
||||||
|
'gfxstream-experimental', 'all'],
|
||||||
description : 'List of vulkan drivers to build. If this is set to auto ' +
|
description : 'List of vulkan drivers to build. If this is set to auto ' +
|
||||||
'all drivers applicable to the target OS/architecture ' +
|
'all drivers applicable to the target OS/architecture ' +
|
||||||
'will be built'
|
'will be built'
|
||||||
|
61
src/gfxstream/guest/meson.build
Normal file
61
src/gfxstream/guest/meson.build
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# Copyright 2022 Android Open Source Project
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
#===============#
|
||||||
|
# Options #
|
||||||
|
#===============#
|
||||||
|
|
||||||
|
with_vulkan_icd_dir = get_option('vulkan-icd-dir')
|
||||||
|
if with_vulkan_icd_dir == ''
|
||||||
|
with_vulkan_icd_dir = join_paths(get_option('datadir'), 'vulkan/icd.d')
|
||||||
|
endif
|
||||||
|
|
||||||
|
#===============#
|
||||||
|
# Configuration #
|
||||||
|
#===============#
|
||||||
|
gfxstream_guest_args = []
|
||||||
|
|
||||||
|
# Our internal guest build
|
||||||
|
gfxstream_guest_args += '-DLINUX_GUEST_BUILD'
|
||||||
|
# Include the gfxstream private VkStructureType definitions
|
||||||
|
gfxstream_guest_args += '-DVK_GFXSTREAM_STRUCTURE_TYPE_EXT'
|
||||||
|
|
||||||
|
#===============#
|
||||||
|
# Dependencies #
|
||||||
|
#===============#
|
||||||
|
|
||||||
|
dl_dep = cc.find_library('dl', required: false)
|
||||||
|
drm_dep = dependency('libdrm')
|
||||||
|
thread_dep = dependency('threads')
|
||||||
|
aemu_base_dep = dependency('aemu_base')
|
||||||
|
|
||||||
|
with_kumquat = false
|
||||||
|
virtgpu_kumquat_dep = dependency('virtgpu_kumquat_ffi', required: false)
|
||||||
|
if virtgpu_kumquat_dep.found()
|
||||||
|
with_kumquat = true
|
||||||
|
endif
|
||||||
|
|
||||||
|
#===============#
|
||||||
|
# Includes #
|
||||||
|
#===============#
|
||||||
|
|
||||||
|
inc_include_mesa = include_directories('../../../include')
|
||||||
|
inc_vulkan_headers = include_directories('../../../include/vulkan')
|
||||||
|
inc_vulkan_enc = include_directories('vulkan_enc')
|
||||||
|
|
||||||
|
#================#
|
||||||
|
# Mesa compat #
|
||||||
|
#================#
|
||||||
|
# dep_libdrm = drm_dep
|
||||||
|
# dep_dl = dl_dep
|
||||||
|
# dep_thread = thread_dep
|
||||||
|
|
||||||
|
#================#
|
||||||
|
# Subdirectories #
|
||||||
|
#================#
|
||||||
|
subdir('iostream')
|
||||||
|
subdir('platform')
|
||||||
|
subdir('GoldfishAddressSpace')
|
||||||
|
subdir('connection-manager')
|
||||||
|
subdir('vulkan_enc')
|
||||||
|
subdir('vulkan')
|
@@ -25,7 +25,7 @@ gfxstream_guest_vk_autogen = custom_target(
|
|||||||
],
|
],
|
||||||
env: {'GFXSTREAM_NO_CLANG_FMT': '1', 'CEREAL_VARIANT' : 'guest',
|
env: {'GFXSTREAM_NO_CLANG_FMT': '1', 'CEREAL_VARIANT' : 'guest',
|
||||||
'GFXSTREAM_GUEST_ENCODER_DIR': guest_enc_path},
|
'GFXSTREAM_GUEST_ENCODER_DIR': guest_enc_path},
|
||||||
input: [genvk, vk_xml_gfxstream, vk_gfxstream_xml],
|
input: [genvk, vk_api_xml, vk_gfxstream_xml],
|
||||||
command: [prog_python, '@INPUT0@', '-registry', '@INPUT1@', '-registryGfxstream', '@INPUT2@',
|
command: [prog_python, '@INPUT0@', '-registry', '@INPUT1@', '-registryGfxstream', '@INPUT2@',
|
||||||
'cereal', '-o', output_host_path],
|
'cereal', '-o', output_host_path],
|
||||||
)
|
)
|
||||||
|
7
src/gfxstream/meson.build
Normal file
7
src/gfxstream/meson.build
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Copyright © 2024 Google
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
genvk = files('codegen/scripts/genvk.py')
|
||||||
|
vk_gfxstream_xml = files('codegen/xml/vk_gfxstream.xml')
|
||||||
|
|
||||||
|
subdir('guest')
|
@@ -99,6 +99,9 @@ endif
|
|||||||
if with_any_nouveau
|
if with_any_nouveau
|
||||||
subdir('nouveau')
|
subdir('nouveau')
|
||||||
endif
|
endif
|
||||||
|
if with_gfxstream_vk
|
||||||
|
subdir('gfxstream')
|
||||||
|
endif
|
||||||
if with_gallium_asahi or with_tools.contains('asahi')
|
if with_gallium_asahi or with_tools.contains('asahi')
|
||||||
subdir('asahi')
|
subdir('asahi')
|
||||||
endif
|
endif
|
||||||
|
Reference in New Issue
Block a user