2022-02-25 10:28:39 +00:00
|
|
|
# Copyright © 2022 Imagination Technologies Ltd.
|
2024-06-28 13:16:28 -07:00
|
|
|
# SPDX-License-Identifier: MIT
|
2022-02-25 10:28:39 +00:00
|
|
|
|
|
|
|
|
subdir('pds')
|
|
|
|
|
|
|
|
|
|
pvr_entrypoints = custom_target(
|
|
|
|
|
'pvr_entrypoints',
|
|
|
|
|
input : [vk_entrypoints_gen, vk_api_xml],
|
|
|
|
|
output : ['pvr_entrypoints.h', 'pvr_entrypoints.c'],
|
|
|
|
|
command : [
|
|
|
|
|
prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--proto', '--weak',
|
|
|
|
|
'--out-h', '@OUTPUT0@', '--out-c', '@OUTPUT1@', '--prefix', 'pvr',
|
2023-03-14 15:39:14 +10:00
|
|
|
'--beta', with_vulkan_beta.to_string()
|
2022-02-25 10:28:39 +00:00
|
|
|
],
|
|
|
|
|
depend_files : vk_entrypoints_gen_depend_files,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
pvr_files = files(
|
|
|
|
|
'winsys/powervr/pvr_drm.c',
|
2022-03-21 11:31:38 +00:00
|
|
|
'winsys/powervr/pvr_drm_bo.c',
|
|
|
|
|
'winsys/powervr/pvr_drm_job_compute.c',
|
|
|
|
|
'winsys/powervr/pvr_drm_job_null.c',
|
|
|
|
|
'winsys/powervr/pvr_drm_job_render.c',
|
|
|
|
|
'winsys/powervr/pvr_drm_job_transfer.c',
|
2022-02-25 10:28:39 +00:00
|
|
|
'winsys/pvr_winsys.c',
|
|
|
|
|
'winsys/pvr_winsys_helper.c',
|
|
|
|
|
'pvr_blit.c',
|
|
|
|
|
'pvr_bo.c',
|
2023-02-24 14:06:39 +00:00
|
|
|
'pvr_border.c',
|
2022-09-20 14:23:57 +01:00
|
|
|
'pvr_clear.c',
|
2022-02-25 10:28:39 +00:00
|
|
|
'pvr_cmd_buffer.c',
|
|
|
|
|
'pvr_csb.c',
|
|
|
|
|
'pvr_descriptor_set.c',
|
|
|
|
|
'pvr_device.c',
|
2022-06-29 09:47:33 +01:00
|
|
|
'pvr_dump_bo.c',
|
|
|
|
|
'pvr_dump_csb.c',
|
2022-02-25 10:28:39 +00:00
|
|
|
'pvr_formats.c',
|
|
|
|
|
'pvr_hw_pass.c',
|
|
|
|
|
'pvr_image.c',
|
|
|
|
|
'pvr_job_common.c',
|
|
|
|
|
'pvr_job_compute.c',
|
|
|
|
|
'pvr_job_context.c',
|
|
|
|
|
'pvr_job_render.c',
|
2022-04-19 17:21:16 +01:00
|
|
|
'pvr_job_transfer.c',
|
2022-02-25 10:28:39 +00:00
|
|
|
'pvr_pass.c',
|
|
|
|
|
'pvr_pipeline.c',
|
2022-05-17 17:19:31 +01:00
|
|
|
'pvr_transfer_frag_store.c',
|
2022-02-25 10:28:39 +00:00
|
|
|
'pvr_query.c',
|
2022-10-05 18:41:46 +05:00
|
|
|
'pvr_query_compute.c',
|
2022-02-25 10:28:39 +00:00
|
|
|
'pvr_queue.c',
|
2023-02-23 05:16:48 +00:00
|
|
|
'pvr_robustness.c',
|
2022-11-22 16:28:29 +00:00
|
|
|
'pvr_spm.c',
|
2022-02-25 10:28:39 +00:00
|
|
|
'pvr_tex_state.c',
|
2024-12-24 12:56:52 +00:00
|
|
|
'pvr_usc.c',
|
2022-02-25 10:28:39 +00:00
|
|
|
'pvr_wsi.c',
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
pvr_includes = [
|
|
|
|
|
include_directories('winsys'),
|
|
|
|
|
libpowervr_pds_includes,
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
pvr_deps = [
|
|
|
|
|
dep_csbgen,
|
|
|
|
|
dep_libdrm,
|
|
|
|
|
dep_valgrind,
|
2023-06-08 10:32:15 +01:00
|
|
|
idep_mesautil,
|
2024-12-24 12:56:52 +00:00
|
|
|
idep_pco_uscgen_programs_h,
|
2022-02-25 10:28:39 +00:00
|
|
|
idep_vulkan_runtime,
|
|
|
|
|
idep_vulkan_util,
|
|
|
|
|
idep_vulkan_wsi,
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
pvr_flags = [
|
2023-09-20 16:00:19 +01:00
|
|
|
imagination_c_args,
|
2022-02-25 10:28:39 +00:00
|
|
|
no_override_init_args,
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
if with_imagination_srv
|
|
|
|
|
pvr_files += files(
|
|
|
|
|
'winsys/pvrsrvkm/pvr_srv.c',
|
|
|
|
|
'winsys/pvrsrvkm/pvr_srv_bo.c',
|
|
|
|
|
'winsys/pvrsrvkm/pvr_srv_bridge.c',
|
2022-04-08 11:50:40 +01:00
|
|
|
'winsys/pvrsrvkm/pvr_srv_job_common.c',
|
2022-02-25 10:28:39 +00:00
|
|
|
'winsys/pvrsrvkm/pvr_srv_job_compute.c',
|
2022-03-28 14:18:00 +01:00
|
|
|
'winsys/pvrsrvkm/pvr_srv_job_null.c',
|
2022-02-25 10:28:39 +00:00
|
|
|
'winsys/pvrsrvkm/pvr_srv_job_render.c',
|
2022-04-04 12:16:45 +01:00
|
|
|
'winsys/pvrsrvkm/pvr_srv_job_transfer.c',
|
2022-03-28 14:18:00 +01:00
|
|
|
'winsys/pvrsrvkm/pvr_srv_sync.c',
|
2023-05-12 13:43:51 +01:00
|
|
|
'winsys/pvrsrvkm/pvr_srv_sync_prim.c',
|
2022-02-25 10:28:39 +00:00
|
|
|
)
|
|
|
|
|
pvr_flags += '-DPVR_SUPPORT_SERVICES_DRIVER'
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
libvulkan_powervr_mesa = shared_library(
|
|
|
|
|
'vulkan_powervr_mesa',
|
2024-05-08 18:42:31 -04:00
|
|
|
[pvr_files, pvr_entrypoints, sha1_h, u_format_pack_h],
|
2022-02-25 10:28:39 +00:00
|
|
|
include_directories : [
|
|
|
|
|
pvr_includes,
|
|
|
|
|
inc_imagination,
|
|
|
|
|
inc_include,
|
|
|
|
|
inc_src,
|
|
|
|
|
],
|
|
|
|
|
link_with : [
|
|
|
|
|
libpowervr_common,
|
2024-04-05 16:12:59 +01:00
|
|
|
libpowervr_compiler,
|
2022-02-25 10:28:39 +00:00
|
|
|
libpowervr_pds,
|
2024-12-24 12:56:52 +00:00
|
|
|
libpowervr_uscgen,
|
2022-02-25 10:28:39 +00:00
|
|
|
libvulkan_wsi,
|
|
|
|
|
],
|
|
|
|
|
dependencies : [
|
|
|
|
|
pvr_deps,
|
2024-04-08 14:06:05 +01:00
|
|
|
idep_nir_headers,
|
2022-02-25 10:28:39 +00:00
|
|
|
],
|
|
|
|
|
c_args : pvr_flags,
|
|
|
|
|
link_args : [
|
2025-09-15 18:33:09 +02:00
|
|
|
vulkan_icd_link_args,
|
2022-02-25 10:28:39 +00:00
|
|
|
ld_args_build_id,
|
|
|
|
|
ld_args_bsymbolic,
|
|
|
|
|
ld_args_gc_sections
|
|
|
|
|
],
|
|
|
|
|
gnu_symbol_visibility : 'hidden',
|
|
|
|
|
install : true,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if with_symbols_check
|
|
|
|
|
test(
|
|
|
|
|
'pvr symbols check',
|
|
|
|
|
symbols_check,
|
|
|
|
|
args : [
|
|
|
|
|
'--lib', libvulkan_powervr_mesa,
|
|
|
|
|
'--symbols-file', vulkan_icd_symbols,
|
|
|
|
|
symbols_check_args,
|
|
|
|
|
],
|
|
|
|
|
suite : ['imagination'],
|
|
|
|
|
)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
powervr_mesa_icd = custom_target(
|
|
|
|
|
'powervr_mesa_icd',
|
|
|
|
|
input : [vk_icd_gen, vk_api_xml],
|
|
|
|
|
output : 'powervr_mesa_icd.@0@.json'.format(host_machine.cpu()),
|
|
|
|
|
command : [
|
|
|
|
|
prog_python, '@INPUT0@',
|
|
|
|
|
'--api-version', '1.0', '--xml', '@INPUT1@',
|
2025-06-16 20:04:11 -04:00
|
|
|
'--sizeof-pointer', sizeof_pointer,
|
2023-04-27 16:21:07 +01:00
|
|
|
'--lib-path', get_option('prefix') / get_option('libdir') / 'libvulkan_powervr_mesa.so',
|
2022-02-25 10:28:39 +00:00
|
|
|
'--out', '@OUTPUT@',
|
|
|
|
|
],
|
|
|
|
|
build_by_default : true,
|
|
|
|
|
install_dir : with_vulkan_icd_dir,
|
2023-08-27 16:35:17 +02:00
|
|
|
install_tag : 'runtime',
|
2022-02-25 10:28:39 +00:00
|
|
|
install : true,
|
|
|
|
|
)
|
|
|
|
|
|
2023-01-25 16:55:32 +01:00
|
|
|
_dev_icd = custom_target(
|
2023-01-17 09:46:41 -08:00
|
|
|
'powervr_mesa_devenv_icd',
|
|
|
|
|
input : [vk_icd_gen, vk_api_xml],
|
2023-04-27 16:21:07 +01:00
|
|
|
output : 'powervr_mesa_devenv_icd.@0@.json'.format(host_machine.cpu()),
|
2023-01-17 09:46:41 -08:00
|
|
|
command : [
|
|
|
|
|
prog_python, '@INPUT0@',
|
|
|
|
|
'--api-version', '1.0', '--xml', '@INPUT1@',
|
2025-06-16 20:04:11 -04:00
|
|
|
'--sizeof-pointer', sizeof_pointer,
|
2023-01-17 09:46:41 -08:00
|
|
|
'--lib-path', meson.current_build_dir() / 'libvulkan_powervr_mesa.so',
|
|
|
|
|
'--out', '@OUTPUT@',
|
|
|
|
|
],
|
|
|
|
|
build_by_default : true,
|
|
|
|
|
)
|
2022-02-25 10:28:39 +00:00
|
|
|
|
2024-04-01 13:30:18 +01:00
|
|
|
devenv.append('VK_DRIVER_FILES', _dev_icd.full_path())
|
|
|
|
|
# Deprecated: replaced by VK_DRIVER_FILES above
|
2023-01-25 16:55:32 +01:00
|
|
|
devenv.append('VK_ICD_FILENAMES', _dev_icd.full_path())
|