panvk: Prepare things for compiling valhall source files

Valhall (v9/v10) will be added progressively. In order to allow that,
we need to extend the panvk_per_arch() macro for v9/v10 and tweak
meson.build so it does include valhall sources without compiling
common per-arch files.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29654>
This commit is contained in:
Boris Brezillon 2024-06-09 17:32:06 +02:00 committed by Marge Bot
parent 6a4e1235ac
commit 3796bfbb76
3 changed files with 23 additions and 2 deletions

View file

@ -29,6 +29,7 @@ panvk_entrypoints = custom_target(
prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--proto', '--weak',
'--out-h', '@OUTPUT0@', '--out-c', '@OUTPUT1@', '--prefix', 'panvk',
'--device-prefix', 'panvk_v6', '--device-prefix', 'panvk_v7',
'--device-prefix', 'panvk_v9', '--device-prefix', 'panvk_v10',
'--beta', with_vulkan_beta.to_string()
],
depend_files : vk_entrypoints_gen_depend_files,
@ -63,6 +64,10 @@ bifrost_files = [
'bifrost/panvk_vX_pipeline_layout.c',
]
valhall_archs = [9, 10]
valhall_inc_dir = ['valhall']
valhall_files = []
jm_archs = [6, 7]
jm_inc_dir = ['jm']
jm_files = [
@ -87,13 +92,25 @@ common_per_arch_files = [
'panvk_vX_shader.c',
]
foreach arch : [6, 7]
per_arch_files = common_per_arch_files
foreach arch : [6, 7, 9, 10]
if arch in valhall_archs
# We're lacking key components to compile common source files for v9/v10.
# Just add the v9/v10 entrypoints for now.
per_arch_files = [
panvk_entrypoints[0],
]
else
per_arch_files = common_per_arch_files
endif
inc_panvk_per_arch = []
if arch in bifrost_archs
inc_panvk_per_arch += bifrost_inc_dir
per_arch_files += bifrost_files
elif arch in valhall_archs
inc_panvk_per_arch += valhall_inc_dir
per_arch_files += valhall_files
endif
if arch in jm_archs

View file

@ -53,6 +53,10 @@
#define panvk_per_arch(name) panvk_arch_name(name, v6)
#elif PAN_ARCH == 7
#define panvk_per_arch(name) panvk_arch_name(name, v7)
#elif PAN_ARCH == 9
#define panvk_per_arch(name) panvk_arch_name(name, v9)
#elif PAN_ARCH == 10
#define panvk_per_arch(name) panvk_arch_name(name, v10)
#else
#error "Unsupported arch"
#endif

View file