mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 11:40:10 +01:00
vulkan: Specify library_arch in ICD files
This should help vk-icd-loader skip libraries of the wrong bit width. Reviewed-by: Eric Engestrom <eric@igalia.com> Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Acked-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35567>
This commit is contained in:
parent
6b9415cb45
commit
f7aa6ba906
14 changed files with 34 additions and 1 deletions
|
|
@ -280,6 +280,7 @@ endif
|
|||
icd_command = [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.4', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', join_paths(icd_lib_path, icd_file_name),
|
||||
'--out', '@OUTPUT@',
|
||||
]
|
||||
|
|
@ -306,6 +307,7 @@ _dev_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.4', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', meson.current_build_dir() / icd_file_name,
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ asahi_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.4', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', join_paths(icd_lib_path, icd_file_name),
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
@ -131,6 +132,7 @@ custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.4', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', meson.current_build_dir() / icd_file_name,
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ broadcom_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.3', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', join_paths(get_option('prefix'), get_option('libdir'),
|
||||
'libvulkan_broadcom.so'),
|
||||
'--out', '@OUTPUT@',
|
||||
|
|
@ -148,6 +149,7 @@ _dev_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.3', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', meson.current_build_dir() / 'libvulkan_broadcom.so',
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -201,6 +201,7 @@ freedreno_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.4', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', join_paths(get_option('prefix'), get_option('libdir'),
|
||||
'libvulkan_freedreno.so'),
|
||||
'--out', '@OUTPUT@',
|
||||
|
|
@ -219,6 +220,7 @@ _dev_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.4', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', meson.current_build_dir() / 'libvulkan_freedreno.so',
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ endif
|
|||
icd_command = [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.4', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', join_paths(icd_lib_path, icd_file_name),
|
||||
'--out', '@OUTPUT@',
|
||||
]
|
||||
|
|
@ -55,6 +56,7 @@ _dev_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.4', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', meson.current_build_dir() / icd_file_name,
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ gfxstream_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.1', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', join_paths(get_option('prefix'), get_option('libdir'),
|
||||
'libvulkan_gfxstream.so'),
|
||||
'--out', '@OUTPUT@',
|
||||
|
|
@ -62,6 +63,7 @@ _dev_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.3', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', meson.current_build_dir() / 'libvulkan_gfxstream.so',
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ powervr_mesa_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.0', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', get_option('prefix') / get_option('libdir') / 'libvulkan_powervr_mesa.so',
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
@ -162,6 +163,7 @@ _dev_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.0', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', meson.current_build_dir() / 'libvulkan_powervr_mesa.so',
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ intel_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.4', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', join_paths(get_option('prefix'), get_option('libdir'),
|
||||
'libvulkan_intel.so'),
|
||||
'--out', '@OUTPUT@',
|
||||
|
|
@ -70,6 +71,7 @@ _dev_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.4', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', meson.current_build_dir() / 'libvulkan_intel.so',
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ intel_hasvk_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.3', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', join_paths(get_option('prefix'), get_option('libdir'),
|
||||
'libvulkan_intel_hasvk.so'),
|
||||
'--out', '@OUTPUT@',
|
||||
|
|
@ -41,6 +42,7 @@ _dev_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.3', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', meson.current_build_dir() / 'libvulkan_intel_hasvk.so',
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ endif
|
|||
icd_command = [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.1', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', join_paths(icd_lib_path, icd_file_name),
|
||||
'--out', '@OUTPUT@',
|
||||
]
|
||||
|
|
@ -92,6 +93,7 @@ icd_command = [
|
|||
icd_dev_command = [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.1', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', join_paths(meson.current_build_dir(), icd_file_name),
|
||||
'--out', '@OUTPUT@',
|
||||
]
|
||||
|
|
|
|||
|
|
@ -179,6 +179,7 @@ nouveau_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.4', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', join_paths(icd_lib_path, icd_file_name),
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
@ -196,6 +197,7 @@ custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.4', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', meson.current_build_dir() / icd_file_name,
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -221,6 +221,7 @@ panfrost_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.4', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', join_paths(get_option('prefix'), get_option('libdir'),
|
||||
'libvulkan_panfrost.so'),
|
||||
'--out', '@OUTPUT@',
|
||||
|
|
@ -239,6 +240,7 @@ _dev_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.4', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', meson.current_build_dir() / 'libvulkan_panfrost.so',
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ virtio_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.3', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', join_paths(get_option('prefix'), get_option('libdir'),
|
||||
'libvulkan_virtio.so'),
|
||||
'--out', '@OUTPUT@',
|
||||
|
|
@ -40,6 +41,7 @@ _dev_icd = custom_target(
|
|||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.3', '--xml', '@INPUT1@',
|
||||
'--sizeof-pointer', sizeof_pointer,
|
||||
'--lib-path', meson.current_build_dir() / 'libvulkan_virtio.so',
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ if __name__ == '__main__':
|
|||
help='Vulkan API version.')
|
||||
parser.add_argument('--xml', required=False,
|
||||
help='Vulkan registry XML for patch version')
|
||||
parser.add_argument('--sizeof-pointer', required=False, type=int,
|
||||
help='sizeof(void*) on the host cpu')
|
||||
parser.add_argument('--lib-path', required=True,
|
||||
help='Path to installed library')
|
||||
parser.add_argument('--out', required=False,
|
||||
|
|
@ -66,13 +68,18 @@ if __name__ == '__main__':
|
|||
lib_path = lib_path.replace('/', '\\')
|
||||
|
||||
json_data = {
|
||||
'file_format_version': '1.0.0',
|
||||
'file_format_version': '1.0.1',
|
||||
'ICD': {
|
||||
'library_path': lib_path,
|
||||
'api_version': version,
|
||||
},
|
||||
}
|
||||
|
||||
if args.sizeof_pointer:
|
||||
bit_width = args.sizeof_pointer * 8
|
||||
if bit_width in [32, 64]:
|
||||
json_data['ICD']['library_arch'] = str(bit_width)
|
||||
|
||||
json_params = {
|
||||
'indent': 4,
|
||||
'sort_keys': True,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue