• 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_samplers.c',
31  'dxil_signature.c',
32  'nir_to_dxil.c',
33)
34
35dxil_nir_algebraic_c = custom_target(
36  'dxil_nir_algebraic.c',
37  input : 'dxil_nir_algebraic.py',
38  output : 'dxil_nir_algebraic.c',
39  command : [
40    prog_python, '@INPUT@',
41    '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
42  ],
43  capture : true,
44  depend_files : nir_algebraic_py,
45)
46
47libdxil_compiler = static_library(
48  'dxil_compiler',
49  [files_libdxil_compiler, dxil_nir_algebraic_c, sha1_h],
50  include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_compiler, inc_gallium],
51  dependencies: [idep_nir_headers],
52  gnu_symbol_visibility : 'hidden',
53)
54
55idep_libdxil_compiler = declare_dependency(
56  link_with : libdxil_compiler,
57  dependencies : [idep_mesautil],
58  include_directories : include_directories('.')
59)
60
61if with_tests
62  test(
63    'dxil_buffer',
64    executable(
65      'dxil_buffer_test',
66      files('dxil_buffer_test.c'),
67      include_directories : [inc_src],
68      dependencies : [idep_libdxil_compiler]
69    ),
70    suite: 'd3d12'
71  )
72endif
73