• 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
21isl_gen_files = files(
22  'isl_emit_depth_stencil.c',
23  'isl_surface_state.c',
24)
25
26isl_gen4_files = files(
27  'isl_gen4.c',
28  'isl_gen4.h',
29)
30
31isl_gen6_files = files(
32  'isl_gen6.c',
33  'isl_gen6.h',
34)
35
36isl_gen7_files = files(
37  'isl_gen7.c',
38  'isl_gen7.h',
39)
40
41isl_gen8_files = files(
42  'isl_gen8.c',
43  'isl_gen8.h',
44)
45
46isl_gen9_files = files(
47  'isl_gen9.c',
48  'isl_gen9.h',
49)
50
51isl_gen12_files = files(
52  'isl_gen12.c',
53  'isl_gen12.h',
54)
55
56isl_gen_libs = []
57foreach g : [['40', isl_gen4_files], ['50', []], ['60', isl_gen6_files],
58             ['70', isl_gen7_files], ['75', []], ['80', isl_gen8_files],
59             ['90', isl_gen9_files], ['110', []], ['120', isl_gen12_files]]
60  _gen = g[0]
61  isl_gen_libs += static_library(
62    'isl_gen@0@'.format(_gen),
63    [g[1], isl_gen_files, gen_xml_pack],
64    include_directories : [inc_include, inc_src, inc_gallium, inc_intel],
65    c_args : [
66      no_override_init_args,
67      '-DGEN_VERSIONx10=@0@'.format(_gen)
68    ],
69    gnu_symbol_visibility : 'hidden',
70  )
71endforeach
72
73isl_format_layout_c = custom_target(
74  'isl_format_layout.c',
75  input : ['gen_format_layout.py', 'isl_format_layout.csv'],
76  output : 'isl_format_layout.c',
77  command : [prog_python, '@INPUT0@', '--csv', '@INPUT1@', '--out', '@OUTPUT@'],
78)
79
80files_isl_tiled_memcpy = files(
81  'isl_tiled_memcpy_normal.c'
82)
83
84files_isl_tiled_memcpy_sse41 = files(
85  'isl_tiled_memcpy_sse41.c',
86)
87
88isl_tiled_memcpy = static_library(
89  'isl_tiled_memcpy',
90  [files_isl_tiled_memcpy],
91  include_directories : [
92    inc_include, inc_src, inc_mesa, inc_gallium, inc_intel,
93  ],
94  c_args : [no_override_init_args, '-msse2'],
95  gnu_symbol_visibility : 'hidden',
96  extra_files : ['isl_tiled_memcpy.c']
97)
98
99if with_sse41
100  isl_tiled_memcpy_sse41 = static_library(
101    'isl_tiled_memcpy_sse41',
102    [files_isl_tiled_memcpy_sse41],
103    include_directories : [
104      inc_include, inc_src, inc_mesa, inc_gallium, inc_intel,
105    ],
106    link_args : ['-Wl,--exclude-libs=ALL'],
107    c_args : [no_override_init_args, '-msse2', sse41_args],
108    gnu_symbol_visibility : 'hidden',
109    extra_files : ['isl_tiled_memcpy.c']
110  )
111else
112  isl_tiled_memcpy_sse41 = []
113endif
114
115libisl_files = files(
116  'isl.c',
117  'isl.h',
118  'isl_aux_info.c',
119  'isl_drm.c',
120  'isl_genX_priv.h',
121  'isl_format.c',
122  'isl_priv.h',
123  'isl_storage_image.c',
124)
125
126libisl = static_library(
127  'isl',
128  [libisl_files, isl_format_layout_c, genX_bits_h],
129  include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel],
130  link_with : [isl_gen_libs, isl_tiled_memcpy, isl_tiled_memcpy_sse41],
131  c_args : [no_override_init_args],
132  gnu_symbol_visibility : 'hidden',
133)
134
135if with_tests
136  test(
137    'isl_surf_get_image_offset',
138    executable(
139      'isl_surf_get_image_offset_test',
140      'tests/isl_surf_get_image_offset_test.c',
141      dependencies : [dep_m, idep_mesautil],
142      include_directories : [inc_include, inc_src, inc_gallium, inc_intel],
143      link_with : [libisl, libintel_dev],
144    ),
145    suite : ['intel'],
146  )
147  test(
148    'isl_aux_info',
149    executable(
150      'isl_aux_info_test',
151      [
152        'tests/isl_aux_info_test.cpp',
153        'isl_aux_info.c',
154      ],
155      dependencies : [dep_m, idep_gtest, idep_mesautil],
156      include_directories : [inc_include, inc_src, inc_gallium, inc_intel],
157      c_args : '-DIN_UNIT_TEST',
158      cpp_args : '-DIN_UNIT_TEST',
159    ),
160    suite : ['intel'],
161  )
162endif
163