• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2017 Intel Corporation
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_etnaviv = files(
22  'hw/cmdstream.xml.h',
23  'hw/common.xml.h',
24  'hw/common_3d.xml.h',
25  'hw/isa.xml.h',
26  'hw/state_3d.xml.h',
27  'hw/state_blt.xml.h',
28  'hw/state.xml.h',
29  'hw/texdesc_3d.xml.h',
30  'etnaviv_asm.c',
31  'etnaviv_asm.h',
32  'etnaviv_blend.c',
33  'etnaviv_blend.h',
34  'etnaviv_blt.c',
35  'etnaviv_blt.h',
36  'etnaviv_clear_blit.c',
37  'etnaviv_clear_blit.h',
38  'etnaviv_compiler.c',
39  'etnaviv_compiler.h',
40  'etnaviv_compiler_nir.c',
41  'etnaviv_compiler_nir_emit.c',
42  'etnaviv_compiler_nir_liveness.c',
43  'etnaviv_compiler_nir_ra.c',
44  'etnaviv_context.c',
45  'etnaviv_context.h',
46  'etnaviv_debug.h',
47  'etnaviv_disasm.c',
48  'etnaviv_disasm.h',
49  'etnaviv_disk_cache.c',
50  'etnaviv_disk_cache.h',
51  'etnaviv_emit.c',
52  'etnaviv_emit.h',
53  'etnaviv_etc2.c',
54  'etnaviv_etc2.h',
55  'etnaviv_fence.c',
56  'etnaviv_fence.h',
57  'etnaviv_format.c',
58  'etnaviv_format.h',
59  'etnaviv_internal.h',
60  'etnaviv_ml.c',
61  'etnaviv_ml.h',
62  'etnaviv_ml_nn.c',
63  'etnaviv_ml_nn.h',
64  'etnaviv_ml_tp.c',
65  'etnaviv_ml_tp.h',
66  'etnaviv_nir_lower_source_mods.c',
67  'etnaviv_nir_lower_texture.c',
68  'etnaviv_nir_lower_ubo_to_uniform.c',
69  'etnaviv_nir.c',
70  'etnaviv_nir.h',
71  'etnaviv_perfmon.c',
72  'etnaviv_perfmon.h',
73  'etnaviv_query.c',
74  'etnaviv_query.h',
75  'etnaviv_query_acc_occlusion.c',
76  'etnaviv_query_acc_perfmon.c',
77  'etnaviv_query_acc.c',
78  'etnaviv_query_acc.h',
79  'etnaviv_query_sw.c',
80  'etnaviv_query_sw.h',
81  'etnaviv_rasterizer.c',
82  'etnaviv_rasterizer.h',
83  'etnaviv_resource.c',
84  'etnaviv_resource.h',
85  'etnaviv_rs.c',
86  'etnaviv_rs.h',
87  'etnaviv_screen.c',
88  'etnaviv_screen.h',
89  'etnaviv_shader.c',
90  'etnaviv_shader.h',
91  'etnaviv_state.c',
92  'etnaviv_state.h',
93  'etnaviv_surface.c',
94  'etnaviv_surface.h',
95  'etnaviv_texture.c',
96  'etnaviv_texture.h',
97  'etnaviv_texture_desc.c',
98  'etnaviv_texture_desc.h',
99  'etnaviv_texture_state.c',
100  'etnaviv_texture_state.h',
101  'etnaviv_tiling.c',
102  'etnaviv_tiling.h',
103  'etnaviv_transfer.c',
104  'etnaviv_transfer.h',
105  'etnaviv_translate.h',
106  'etnaviv_uniforms.c',
107  'etnaviv_uniforms.h',
108  'etnaviv_util.h',
109  'etnaviv_zsa.c',
110  'etnaviv_zsa.h',
111)
112
113libetnaviv = static_library(
114  'etnaviv',
115  files_etnaviv,
116  gnu_symbol_visibility : 'hidden',
117  include_directories : [
118    inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_etnaviv,
119  ],
120  link_with: [libetnaviv_drm, libetnaviv_decode],
121  dependencies : [dep_libdrm, idep_nir_headers, idep_mesautil],
122)
123
124etnaviv_compiler = executable(
125  'etnaviv_compiler',
126  'etnaviv_compiler_cmdline.c',
127  include_directories : [
128    inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_etnaviv,
129  ],
130  link_with : [libgallium, libetnaviv, libetnaviv_drm],
131  build_by_default : with_tools.contains('etnaviv'),
132  install : with_tools.contains('etnaviv'),
133  dependencies : [idep_mesautil, dep_libdrm, idep_nir],
134)
135
136driver_etnaviv = declare_dependency(
137  compile_args : '-DGALLIUM_ETNAVIV',
138  link_with : [libetnaviv, libetnavivdrm],
139  dependencies : idep_nir,
140)
141
142if with_tests
143  test(
144    'lower_ubo',
145    executable(
146      'nir_lower_ubo_test',
147      files('tests/lower_ubo_tests.cpp'),
148      cpp_args : [cpp_msvc_compat_args],
149      gnu_symbol_visibility : 'hidden',
150      include_directories : [inc_include, inc_src, inc_gallium],
151      link_with : [libetnaviv],
152      dependencies : [idep_gtest, idep_nir],
153    ),
154    suite : ['compiler', 'etnaviv'],
155    protocol : 'gtest',
156  )
157endif
158