• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2018 Rob Clark
2# Copyright © 2019 Collabora
3
4# Permission is hereby granted, free of charge, to any person obtaining a copy
5# of this software and associated documentation files (the "Software"), to deal
6# in the Software without restriction, including without limitation the rights
7# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8# copies of the Software, and to permit persons to whom the Software is
9# furnished to do so, subject to the following conditions:
10
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the 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
22pan_packers = []
23foreach packer : ['common', 'v4', 'v5', 'v6', 'v7', 'v9']
24  pan_packers += custom_target(
25    packer + '_pack.h',
26    input : ['gen_pack.py', packer + '.xml'],
27    output : packer + '_pack.h',
28    command : [prog_python, '@INPUT@'],
29    capture : true,
30  )
31endforeach
32
33idep_pan_packers = declare_dependency(
34  sources : [pan_packers],
35  include_directories : include_directories('.'),
36)
37
38libpanfrost_decode_per_arch = []
39
40foreach ver : ['4', '5', '6', '7', '9']
41  libpanfrost_decode_per_arch += static_library(
42    'pandecode-arch-v' + ver,
43    ['decode.c', pan_packers],
44    include_directories : [inc_include, inc_src, inc_panfrost],
45    dependencies : [dep_libdrm, idep_pan_packers, idep_nir],
46    c_args : [no_override_init_args, '-DPAN_ARCH=' + ver],
47    gnu_symbol_visibility : 'hidden',
48    build_by_default : false,
49  )
50endforeach
51
52libpanfrost_decode = static_library(
53  'panfrost_decode',
54  [
55    'decode_common.c',
56    pan_packers
57  ],
58  include_directories : [inc_include, inc_src, inc_panfrost],
59  dependencies : idep_mesautil,
60  c_args : [no_override_init_args],
61  gnu_symbol_visibility : 'hidden',
62  build_by_default : false,
63  link_with: [libpanfrost_decode_per_arch],
64)
65