• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2018 Collabora Ltd
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21files_libzink = files(
22  'nir_lower_dynamic_bo_access.c',
23  'nir_to_spirv/nir_to_spirv.c',
24  'nir_to_spirv/spirv_builder.c',
25  'zink_batch.c',
26  'zink_blit.c',
27  'zink_compiler.c',
28  'zink_context.c',
29  'zink_draw.c',
30  'zink_fence.c',
31  'zink_format.c',
32  'zink_framebuffer.c',
33  'zink_pipeline.c',
34  'zink_program.c',
35  'zink_query.c',
36  'zink_render_pass.c',
37  'zink_resource.c',
38  'zink_screen.c',
39  'zink_state.c',
40  'zink_surface.c',
41)
42
43zink_device_info = custom_target(
44  'zink_device_info.c',
45  input : ['zink_device_info.py'],
46  output : ['zink_device_info.h', 'zink_device_info.c'],
47  command : [
48    prog_python, '@INPUT@', '@OUTPUT@'
49  ]
50)
51
52zink_nir_algebraic_c = custom_target(
53  'zink_nir_algebraic.c',
54  input : 'nir_to_spirv/zink_nir_algebraic.py',
55  output : 'zink_nir_algebraic.c',
56  command : [
57    prog_python, '@INPUT@',
58    '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
59  ],
60  capture : true,
61  depend_files : nir_algebraic_py,
62)
63
64libzink = static_library(
65  'zink',
66  [files_libzink, zink_device_info, zink_nir_algebraic_c],
67  gnu_symbol_visibility : 'hidden',
68  include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_vulkan_wsi, inc_vulkan_util],
69  dependencies: [dep_vulkan, idep_nir_headers],
70)
71
72driver_zink = declare_dependency(
73  compile_args : '-DGALLIUM_ZINK',
74  link_with : [libzink],
75)
76