• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © Microsoft Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a
4# copy of this software and associated documentation files (the "Software"),
5# to deal in the Software without restriction, including without limitation
6# the rights to use, copy, modify, merge, publish, distribute, sublicense,
7# and/or sell copies of the Software, and to permit persons to whom the
8# Software is furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice (including the next
11# paragraph) shall be included in all copies or substantial portions of the
12# Software.
13
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20# IN THE SOFTWARE.
21
22files_libdxil_compiler = files(
23  'dxil_buffer.c',
24  'dxil_container.c',
25  'dxil_dump.c',
26  'dxil_enums.c',
27  'dxil_function.c',
28  'dxil_module.c',
29  'dxil_nir.c',
30  'dxil_nir_lower_int_cubemaps.c',
31  'dxil_nir_lower_int_samplers.c',
32  'dxil_nir_lower_vs_vertex_conversion.c',
33  'dxil_signature.c',
34  'dxil_nir_tess.c',
35  'nir_to_dxil.c',
36)
37
38if host_machine.system() == 'windows'
39  files_libdxil_compiler += files('dxil_validator.cpp')
40endif
41
42dxil_nir_algebraic_c = custom_target(
43  'dxil_nir_algebraic.c',
44  input : 'dxil_nir_algebraic.py',
45  output : 'dxil_nir_algebraic.c',
46  command : [
47    prog_python, '@INPUT@',
48    '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
49  ],
50  capture : true,
51  depend_files : nir_algebraic_depends,
52)
53
54libdxil_compiler = static_library(
55  'dxil_compiler',
56  [files_libdxil_compiler, dxil_nir_algebraic_c, sha1_h],
57  include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_compiler, inc_gallium],
58  dependencies: [idep_nir_headers],
59  gnu_symbol_visibility : 'hidden',
60)
61
62idep_libdxil_compiler = declare_dependency(
63  link_with : libdxil_compiler,
64  dependencies : [idep_mesautil, dep_version],
65  include_directories : include_directories('.')
66)
67
68if with_tests
69  test(
70    'dxil_buffer',
71    executable(
72      'dxil_buffer_test',
73      files('dxil_buffer_test.c'),
74      include_directories : [inc_src],
75      dependencies : [idep_libdxil_compiler]
76    ),
77    suite: 'd3d12'
78  )
79endif
80