• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2022 Imagination Technologies 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 (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 THE
17# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20# SOFTWARE.
21
22with_imagination_tools = with_tools.contains('imagination')
23
24libpowervr_rogue_files = files(
25  'nir/rogue_nir_constreg.c',
26  'nir/rogue_nir_lower_io.c',
27  'nir/rogue_nir_pfo.c',
28
29  'rogue.c',
30  'rogue_build_data.c',
31  'rogue_compiler.c',
32  'rogue_constreg.c',
33  'rogue_dump.c',
34  'rogue_encode.c',
35  'rogue_encoders.c',
36  'rogue_instr.c',
37  'rogue_nir.c',
38  'rogue_operand.c',
39  'rogue_regalloc.c',
40  'rogue_shader.c',
41  'rogue_util.c',
42  'rogue_validate.c',
43)
44
45libpowervr_rogue = shared_library(
46  'powervr_rogue',
47  libpowervr_rogue_files,
48  include_directories : [
49    inc_imagination,
50    inc_include,
51    inc_compiler,
52    inc_src,
53    inc_mapi,
54    inc_mesa,
55    inc_gallium,
56    inc_gallium_aux,
57  ],
58  c_args : [no_override_init_args],
59  gnu_symbol_visibility : 'hidden',
60  dependencies : [idep_mesautil, idep_nir, dep_csbgen],
61  install : true,
62)
63
64rogue_compiler = executable(
65  'rogue_compiler',
66  'tools/offline_compiler.c',
67  link_with : [libpowervr_rogue],
68  dependencies : [idep_mesautil, idep_nir],
69  include_directories : [
70    inc_mesa,
71    inc_include,
72    inc_src,
73    inc_mapi,
74    inc_gallium,
75    inc_gallium_aux,
76    inc_compiler,
77  ],
78  build_by_default : with_imagination_tools,
79  install : with_imagination_tools,
80)
81