2017-09-20 19:53:29 +01:00
|
|
|
# Copyright © 2017 Intel Corporation
|
|
|
|
|
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
|
|
# in the Software without restriction, including without limitation the rights
|
|
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
|
|
# furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
# The above copyright notice and this permission notice shall be included in
|
|
|
|
# all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
# SOFTWARE.
|
|
|
|
|
|
|
|
radv_entrypoints = custom_target(
|
|
|
|
'radv_entrypoints.[ch]',
|
|
|
|
input : ['radv_entrypoints_gen.py', vk_api_xml],
|
|
|
|
output : ['radv_entrypoints.h', 'radv_entrypoints.c'],
|
2017-12-11 23:56:08 +00:00
|
|
|
command : [
|
2018-08-09 09:27:26 +01:00
|
|
|
prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--outdir',
|
2017-12-11 23:56:08 +00:00
|
|
|
meson.current_build_dir()
|
|
|
|
],
|
2017-10-17 16:21:54 +01:00
|
|
|
depend_files : files('radv_extensions.py'),
|
2017-09-20 19:53:29 +01:00
|
|
|
)
|
|
|
|
|
2017-10-17 18:58:28 +01:00
|
|
|
radv_extensions_c = custom_target(
|
2017-10-17 11:59:48 +01:00
|
|
|
'radv_extensions.c',
|
2018-04-10 06:01:14 +01:00
|
|
|
input : ['radv_extensions.py', vk_api_xml],
|
2018-02-10 20:43:55 +00:00
|
|
|
output : ['radv_extensions.c', 'radv_extensions.h'],
|
2017-12-11 23:56:08 +00:00
|
|
|
command : [
|
2018-08-09 09:27:26 +01:00
|
|
|
prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--out-c', '@OUTPUT0@',
|
2018-02-10 20:43:55 +00:00
|
|
|
'--out-h', '@OUTPUT1@'
|
2017-12-11 23:56:08 +00:00
|
|
|
],
|
2017-10-17 11:59:48 +01:00
|
|
|
)
|
|
|
|
|
2019-03-12 23:38:02 +00:00
|
|
|
amd_vk_format_table_c = custom_target(
|
|
|
|
'amd_vk_format_table.c',
|
2017-09-20 19:53:29 +01:00
|
|
|
input : ['vk_format_table.py', 'vk_format_layout.csv'],
|
|
|
|
output : 'vk_format_table.c',
|
2018-08-09 09:27:26 +01:00
|
|
|
command : [prog_python, '@INPUT@'],
|
2017-09-20 19:53:29 +01:00
|
|
|
depend_files : files('vk_format_parse.py'),
|
|
|
|
capture : true,
|
|
|
|
)
|
|
|
|
|
2019-06-25 17:15:14 +01:00
|
|
|
radv_gfx10_format_table_h = custom_target(
|
|
|
|
'radv_gfx10_format_table.h',
|
|
|
|
input : ['gfx10_format_table.py', 'vk_format_layout.csv', '../registers/gfx10-rsrc.json'],
|
|
|
|
output : 'gfx10_format_table.h',
|
|
|
|
command : [prog_python, '@INPUT@'],
|
|
|
|
capture : true,
|
|
|
|
depend_files : files('../registers/regdb.py')
|
|
|
|
)
|
|
|
|
|
2017-09-20 19:53:29 +01:00
|
|
|
libradv_files = files(
|
|
|
|
'winsys/amdgpu/radv_amdgpu_bo.c',
|
|
|
|
'winsys/amdgpu/radv_amdgpu_bo.h',
|
|
|
|
'winsys/amdgpu/radv_amdgpu_cs.c',
|
|
|
|
'winsys/amdgpu/radv_amdgpu_cs.h',
|
|
|
|
'winsys/amdgpu/radv_amdgpu_surface.c',
|
|
|
|
'winsys/amdgpu/radv_amdgpu_surface.h',
|
|
|
|
'winsys/amdgpu/radv_amdgpu_winsys.c',
|
|
|
|
'winsys/amdgpu/radv_amdgpu_winsys.h',
|
|
|
|
'winsys/amdgpu/radv_amdgpu_winsys_public.h',
|
|
|
|
'radv_cmd_buffer.c',
|
|
|
|
'radv_cs.h',
|
|
|
|
'radv_debug.c',
|
|
|
|
'radv_debug.h',
|
|
|
|
'radv_device.c',
|
|
|
|
'radv_descriptor_set.c',
|
|
|
|
'radv_descriptor_set.h',
|
|
|
|
'radv_formats.c',
|
|
|
|
'radv_image.c',
|
2018-06-27 02:34:25 +01:00
|
|
|
'radv_llvm_helper.cpp',
|
2017-09-20 19:53:29 +01:00
|
|
|
'radv_meta.c',
|
|
|
|
'radv_meta.h',
|
|
|
|
'radv_meta_blit.c',
|
|
|
|
'radv_meta_blit2d.c',
|
|
|
|
'radv_meta_buffer.c',
|
|
|
|
'radv_meta_bufimage.c',
|
|
|
|
'radv_meta_clear.c',
|
|
|
|
'radv_meta_copy.c',
|
|
|
|
'radv_meta_decompress.c',
|
|
|
|
'radv_meta_fast_clear.c',
|
2018-12-17 19:59:33 +00:00
|
|
|
'radv_meta_fmask_expand.c',
|
2017-09-20 19:53:29 +01:00
|
|
|
'radv_meta_resolve.c',
|
|
|
|
'radv_meta_resolve_cs.c',
|
|
|
|
'radv_meta_resolve_fs.c',
|
2019-03-21 00:29:52 +00:00
|
|
|
'radv_nir_lower_ycbcr_textures.c',
|
2018-03-09 15:58:10 +00:00
|
|
|
'radv_nir_to_llvm.c',
|
2017-09-20 19:53:29 +01:00
|
|
|
'radv_pass.c',
|
|
|
|
'radv_pipeline.c',
|
|
|
|
'radv_pipeline_cache.c',
|
|
|
|
'radv_private.h',
|
|
|
|
'radv_radeon_winsys.h',
|
|
|
|
'radv_shader.c',
|
|
|
|
'radv_shader.h',
|
2018-06-27 02:34:25 +01:00
|
|
|
'radv_shader_helper.h',
|
2018-03-13 13:49:11 +00:00
|
|
|
'radv_shader_info.c',
|
2017-09-20 19:53:29 +01:00
|
|
|
'radv_query.c',
|
|
|
|
'radv_util.c',
|
|
|
|
'radv_util.h',
|
|
|
|
'radv_wsi.c',
|
|
|
|
'si_cmd_buffer.c',
|
|
|
|
'vk_format.h',
|
|
|
|
)
|
|
|
|
|
|
|
|
radv_deps = []
|
|
|
|
radv_flags = []
|
|
|
|
|
|
|
|
if with_platform_x11
|
|
|
|
radv_deps += dep_xcb_dri3
|
|
|
|
radv_flags += [
|
|
|
|
'-DVK_USE_PLATFORM_XCB_KHR',
|
|
|
|
'-DVK_USE_PLATFORM_XLIB_KHR',
|
|
|
|
]
|
|
|
|
libradv_files += files('radv_wsi_x11.c')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if with_platform_wayland
|
|
|
|
radv_deps += dep_wayland_client
|
|
|
|
radv_flags += '-DVK_USE_PLATFORM_WAYLAND_KHR'
|
|
|
|
libradv_files += files('radv_wsi_wayland.c')
|
|
|
|
endif
|
|
|
|
|
2018-02-07 18:31:44 +00:00
|
|
|
if with_platform_drm
|
|
|
|
radv_flags += '-DVK_USE_PLATFORM_DISPLAY_KHR'
|
|
|
|
libradv_files += files('radv_wsi_display.c')
|
|
|
|
endif
|
|
|
|
|
2018-02-09 15:45:58 +00:00
|
|
|
if with_xlib_lease
|
2018-06-19 23:58:30 +01:00
|
|
|
radv_deps += [dep_xcb_xrandr, dep_xlib_xrandr]
|
2018-02-09 15:45:58 +00:00
|
|
|
radv_flags += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'
|
|
|
|
endif
|
|
|
|
|
2019-06-19 14:03:43 +01:00
|
|
|
if with_platform_android
|
|
|
|
radv_flags += [
|
|
|
|
'-DVK_USE_PLATFORM_ANDROID_KHR'
|
|
|
|
]
|
|
|
|
libradv_files += files('radv_android.c')
|
|
|
|
endif
|
|
|
|
|
2017-09-20 19:53:29 +01:00
|
|
|
libvulkan_radeon = shared_library(
|
|
|
|
'vulkan_radeon',
|
2019-06-25 17:15:14 +01:00
|
|
|
[libradv_files, radv_entrypoints, radv_extensions_c, amd_vk_format_table_c, sha1_h, xmlpool_options_h, radv_gfx10_format_table_h],
|
2017-12-11 23:56:08 +00:00
|
|
|
include_directories : [
|
2019-05-10 18:55:54 +01:00
|
|
|
inc_common, inc_amd, inc_amd_common, inc_compiler, inc_util, inc_vulkan_wsi,
|
2017-12-11 23:56:08 +00:00
|
|
|
],
|
|
|
|
link_with : [
|
2019-05-10 18:55:54 +01:00
|
|
|
libamd_common, libamdgpu_addrlib, libvulkan_wsi,
|
2019-04-14 23:32:27 +01:00
|
|
|
libmesa_util, libxmlconfig
|
2017-12-11 23:56:08 +00:00
|
|
|
],
|
|
|
|
dependencies : [
|
|
|
|
dep_llvm, dep_libdrm_amdgpu, dep_thread, dep_elf, dep_dl, dep_m,
|
2018-12-01 17:30:20 +00:00
|
|
|
dep_valgrind, radv_deps,
|
2019-05-07 00:08:43 +01:00
|
|
|
idep_nir, idep_vulkan_util, idep_amdgfxregs_h,
|
2017-12-11 23:56:08 +00:00
|
|
|
],
|
2017-09-20 19:53:29 +01:00
|
|
|
c_args : [c_vis_args, no_override_init_args, radv_flags],
|
2018-10-08 16:23:25 +01:00
|
|
|
cpp_args : [cpp_vis_args, radv_flags],
|
2017-09-20 19:53:29 +01:00
|
|
|
link_args : [ld_args_bsymbolic, ld_args_gc_sections],
|
|
|
|
install : true,
|
|
|
|
)
|
|
|
|
|
2018-03-08 23:47:26 +00:00
|
|
|
radeon_icd = custom_target(
|
|
|
|
'radeon_icd',
|
|
|
|
input : 'radv_icd.py',
|
2017-11-09 22:55:37 +00:00
|
|
|
output : 'radeon_icd.@0@.json'.format(host_machine.cpu()),
|
2018-03-08 23:47:26 +00:00
|
|
|
command : [
|
2018-08-09 09:27:26 +01:00
|
|
|
prog_python, '@INPUT@',
|
2018-03-08 23:47:26 +00:00
|
|
|
'--lib-path', join_paths(get_option('prefix'), get_option('libdir')),
|
|
|
|
'--out', '@OUTPUT@',
|
|
|
|
],
|
|
|
|
depend_files : files('radv_extensions.py'),
|
|
|
|
build_by_default : true,
|
2017-09-20 19:53:29 +01:00
|
|
|
install_dir : with_vulkan_icd_dir,
|
2018-03-08 23:47:26 +00:00
|
|
|
install : true,
|
2017-09-20 19:53:29 +01:00
|
|
|
)
|