2018-08-08 23:23:57 +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.
|
|
|
|
|
|
|
|
tu_entrypoints = custom_target(
|
|
|
|
'tu_entrypoints.[ch]',
|
|
|
|
input : ['tu_entrypoints_gen.py', vk_api_xml],
|
|
|
|
output : ['tu_entrypoints.h', 'tu_entrypoints.c'],
|
|
|
|
command : [
|
|
|
|
prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--outdir',
|
|
|
|
meson.current_build_dir()
|
|
|
|
],
|
|
|
|
depend_files : files('tu_extensions.py'),
|
|
|
|
)
|
|
|
|
|
|
|
|
tu_extensions_c = custom_target(
|
|
|
|
'tu_extensions.c',
|
|
|
|
input : ['tu_extensions.py', vk_api_xml],
|
|
|
|
output : ['tu_extensions.c', 'tu_extensions.h'],
|
|
|
|
command : [
|
|
|
|
prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--out-c', '@OUTPUT0@',
|
|
|
|
'--out-h', '@OUTPUT1@'
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-03-12 23:38:02 +00:00
|
|
|
tu_format_table_c = custom_target(
|
|
|
|
'tu_format_table.c',
|
2018-08-08 23:23:57 +01:00
|
|
|
input : ['vk_format_table.py', 'vk_format_layout.csv'],
|
|
|
|
output : 'vk_format_table.c',
|
|
|
|
command : [prog_python, '@INPUT@'],
|
|
|
|
depend_files : files('vk_format_parse.py'),
|
|
|
|
capture : true,
|
|
|
|
)
|
|
|
|
|
|
|
|
libtu_files = files(
|
|
|
|
'tu_cmd_buffer.c',
|
2019-01-16 17:27:04 +00:00
|
|
|
'tu_cs.c',
|
2018-08-08 23:23:57 +01:00
|
|
|
'tu_device.c',
|
|
|
|
'tu_descriptor_set.c',
|
|
|
|
'tu_descriptor_set.h',
|
2018-12-21 13:12:17 +00:00
|
|
|
'tu_drm.c',
|
2019-02-14 22:36:52 +00:00
|
|
|
'tu_fence.c',
|
2018-08-08 23:23:57 +01:00
|
|
|
'tu_formats.c',
|
|
|
|
'tu_image.c',
|
|
|
|
'tu_meta_blit.c',
|
|
|
|
'tu_meta_buffer.c',
|
|
|
|
'tu_meta_clear.c',
|
|
|
|
'tu_meta_copy.c',
|
|
|
|
'tu_meta_resolve.c',
|
|
|
|
'tu_pass.c',
|
|
|
|
'tu_pipeline.c',
|
|
|
|
'tu_pipeline_cache.c',
|
|
|
|
'tu_private.h',
|
|
|
|
'tu_query.c',
|
2019-02-20 17:53:47 +00:00
|
|
|
'tu_shader.c',
|
2018-08-08 23:23:57 +01:00
|
|
|
'tu_util.c',
|
|
|
|
'tu_util.h',
|
2019-02-08 21:45:53 +00:00
|
|
|
'tu_wsi.c',
|
2018-08-08 23:23:57 +01:00
|
|
|
'vk_format.h',
|
|
|
|
)
|
|
|
|
|
|
|
|
tu_deps = []
|
|
|
|
tu_flags = []
|
|
|
|
|
2019-02-08 21:45:53 +00:00
|
|
|
if with_platform_wayland
|
|
|
|
tu_deps += dep_wayland_client
|
|
|
|
tu_flags += '-DVK_USE_PLATFORM_WAYLAND_KHR'
|
|
|
|
libtu_files += files('tu_wsi_wayland.c')
|
|
|
|
endif
|
|
|
|
|
2018-08-08 23:23:57 +01:00
|
|
|
libvulkan_freedreno = shared_library(
|
|
|
|
'vulkan_freedreno',
|
2019-03-12 23:38:02 +00:00
|
|
|
[libtu_files, tu_entrypoints, tu_extensions_c, tu_format_table_c],
|
2018-08-08 23:23:57 +01:00
|
|
|
include_directories : [
|
2018-08-09 10:09:01 +01:00
|
|
|
inc_common,
|
|
|
|
inc_compiler,
|
2019-02-08 21:45:53 +00:00
|
|
|
inc_vulkan_wsi,
|
2018-08-09 10:09:01 +01:00
|
|
|
inc_freedreno,
|
2018-08-08 23:23:57 +01:00
|
|
|
],
|
|
|
|
link_with : [
|
2019-02-08 21:45:53 +00:00
|
|
|
libvulkan_wsi,
|
2018-08-08 23:23:57 +01:00
|
|
|
libmesa_util,
|
2019-02-20 17:53:47 +00:00
|
|
|
libfreedreno_drm, # required by ir3_shader_get_variant, which we don't use
|
|
|
|
libfreedreno_ir3,
|
2018-08-08 23:23:57 +01:00
|
|
|
],
|
|
|
|
dependencies : [
|
|
|
|
dep_dl,
|
|
|
|
dep_elf,
|
|
|
|
dep_libdrm,
|
|
|
|
dep_llvm,
|
|
|
|
dep_m,
|
|
|
|
dep_thread,
|
|
|
|
dep_valgrind,
|
|
|
|
idep_nir,
|
2019-02-08 21:45:53 +00:00
|
|
|
tu_deps,
|
2019-05-10 18:55:54 +01:00
|
|
|
idep_vulkan_util,
|
2018-08-08 23:23:57 +01:00
|
|
|
],
|
|
|
|
c_args : [c_vis_args, no_override_init_args, tu_flags],
|
|
|
|
link_args : [ld_args_bsymbolic, ld_args_gc_sections],
|
|
|
|
install : true,
|
|
|
|
)
|
|
|
|
|
|
|
|
freedreno_icd = custom_target(
|
|
|
|
'freedreno_icd',
|
|
|
|
input : 'tu_icd.py',
|
|
|
|
output : 'freedreno_icd.@0@.json'.format(host_machine.cpu()),
|
|
|
|
command : [
|
|
|
|
prog_python, '@INPUT@',
|
|
|
|
'--lib-path', join_paths(get_option('prefix'), get_option('libdir')),
|
|
|
|
'--out', '@OUTPUT@',
|
|
|
|
],
|
|
|
|
depend_files : files('tu_extensions.py'),
|
|
|
|
build_by_default : true,
|
|
|
|
install_dir : with_vulkan_icd_dir,
|
|
|
|
install : true,
|
|
|
|
)
|
|
|
|
|
|
|
|
tu_dev_icd = custom_target(
|
|
|
|
'tu_dev_icd',
|
|
|
|
input : 'tu_icd.py',
|
|
|
|
output : 'dev_icd.json',
|
|
|
|
command : [
|
|
|
|
prog_python, '@INPUT@', '--lib-path', meson.current_build_dir(),
|
|
|
|
'--out', '@OUTPUT@'
|
|
|
|
],
|
|
|
|
depend_files : files('tu_extensions.py'),
|
|
|
|
build_by_default : true,
|
|
|
|
install : false,
|
|
|
|
)
|