• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2020 Google, Inc
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
21isa_depend_files = [
22  'ir3-common.xml',
23  'ir3-cat0.xml',
24  'ir3-cat1.xml',
25  'ir3-cat2.xml',
26  'ir3-cat3.xml',
27  'ir3-cat4.xml',
28  'ir3-cat5.xml',
29  'ir3-cat6.xml',
30  'ir3-cat7.xml',
31  isaspec_py_deps
32]
33
34ir3_isa = custom_target(
35  'ir3-isa',
36  input: ['ir3.xml'],
37  output: ['isaspec-isa.h', 'ir3-isa.c', 'ir3-isa.h'],
38  command: [
39    prog_isaspec_decode, '@INPUT@', '@OUTPUT@'
40  ],
41  depend_files: isa_depend_files,
42)
43
44decode_files = [
45  ir3_isa,
46  'isa.h',
47]
48
49libir3decode = static_library(
50  'ir3decode',
51  decode_files,
52  dependencies: [idep_mesautil, idep_isaspec_decode],
53  include_directories: [
54    inc_include,
55    inc_src,
56    # Hack for src/util/half_float.h indirect dependency on
57    # gallium headers:
58    inc_gallium,
59  ],
60  gnu_symbol_visibility: 'hidden',
61)
62
63ir3disasm = executable(
64  'ir3-disasm',
65  ['ir3-disasm.c'],
66  link_with: libir3decode,
67  build_by_default: with_tools.contains('freedreno'),
68  include_directories: [
69    inc_src,
70  ],
71  install: false,
72)
73
74encode_h = custom_target(
75  'encode.h',
76  input: ['ir3.xml'],
77  output: 'encode.h',
78  command: [
79    prog_isaspec_encode, '@INPUT@', '@OUTPUT@'
80  ],
81  depend_files: isa_depend_files,
82)
83
84encode_files = [
85  encode_h,
86  'encode.c',
87  'isa.h',
88]
89
90libir3encode = static_library(
91  'ir3encode',
92  encode_files,
93  dependencies: [idep_mesautil, idep_nir],
94  include_directories: [
95    inc_src,
96    inc_include,
97    inc_freedreno,
98    inc_gallium,
99  ],
100  gnu_symbol_visibility: 'hidden',
101)
102