• 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@', '-p', dir_compiler_nir,
48  ],
49  capture : true,
50  depend_files : nir_algebraic_depends,
51)
52
53libdxil_compiler = static_library(
54  'dxil_compiler',
55  [files_libdxil_compiler, dxil_nir_algebraic_c, sha1_h],
56  include_directories : [inc_include, inc_src],
57  dependencies: [idep_nir_headers, dep_valgrind],
58  gnu_symbol_visibility : 'hidden',
59)
60
61idep_libdxil_compiler = declare_dependency(
62  link_with : libdxil_compiler,
63  dependencies : [idep_mesautil, dep_version],
64  include_directories : include_directories('.')
65)
66
67if with_tests
68  test(
69    'dxil_buffer',
70    executable(
71      'dxil_buffer_test',
72      files('dxil_buffer_test.c'),
73      include_directories : [inc_src],
74      dependencies : [idep_libdxil_compiler]
75    ),
76    suite: 'd3d12'
77  )
78endif
79