• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2019 Google LLC
2# SPDX-License-Identifier: MIT
3#
4# based in part on anv and radv which are:
5# Copyright © 2017 Intel Corporation
6
7vn_entrypoints = custom_target(
8  'vn_entrypoints',
9  input : [vk_entrypoints_gen, vk_api_xml],
10  output : ['vn_entrypoints.h', 'vn_entrypoints.c'],
11  command : [
12    prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--proto', '--weak',
13    '--out-h', '@OUTPUT0@', '--out-c', '@OUTPUT1@', '--prefix', 'vn',
14  ],
15)
16
17virtio_icd = custom_target(
18  'virtio_icd',
19  input : [vk_icd_gen, vk_api_xml],
20  output : 'virtio_icd.@0@.json'.format(host_machine.cpu()),
21  command : [
22    prog_python, '@INPUT0@',
23    '--api-version', '1.2', '--xml', '@INPUT1@',
24    '--lib-path', join_paths(get_option('prefix'), get_option('libdir'),
25                             'libvulkan_virtio.so'),
26    '--out', '@OUTPUT@',
27  ],
28  build_by_default : true,
29  install_dir : with_vulkan_icd_dir,
30  install : true,
31)
32
33libvn_files = files(
34  'vn_buffer.c',
35  'vn_command_buffer.c',
36  'vn_common.c',
37  'vn_cs.c',
38  'vn_descriptor_set.c',
39  'vn_device.c',
40  'vn_device_memory.c',
41  'vn_icd.c',
42  'vn_image.c',
43  'vn_instance.c',
44  'vn_physical_device.c',
45  'vn_pipeline.c',
46  'vn_query_pool.c',
47  'vn_queue.c',
48  'vn_render_pass.c',
49  'vn_ring.c',
50  'vn_renderer_virtgpu.c',
51  'vn_renderer_vtest.c',
52)
53
54vn_deps = [
55  dep_libdrm,
56  dep_thread,
57  idep_mesautil,
58  idep_vulkan_util,
59  idep_vulkan_wsi,
60  idep_xmlconfig,
61]
62
63vn_flags = [
64  no_override_init_args,
65]
66
67vn_libs = []
68
69if with_platform_wayland or with_platform_x11
70  libvn_files += files('vn_wsi.c')
71  vn_flags += '-DVN_USE_WSI_PLATFORM'
72endif
73
74if with_platform_wayland
75  vn_deps += dep_wayland_client
76endif
77
78if with_platform_x11
79  vn_deps += dep_xcb_dri3
80endif
81
82if with_platform_android
83  libvn_files += files('vn_android.c')
84  vn_deps += dep_android
85endif
86
87libvulkan_virtio = shared_library(
88  'vulkan_virtio',
89  [libvn_files, vn_entrypoints, sha1_h],
90  include_directories : [
91    inc_include, inc_src, inc_virtio,
92  ],
93  link_with : vn_libs,
94  dependencies : [vn_deps],
95  c_args : [vn_flags],
96  link_args : [ld_args_bsymbolic, ld_args_gc_sections],
97  gnu_symbol_visibility : 'hidden',
98  install : true,
99)
100