1 # Copyright © 2017 Intel Corporation
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:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
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
21 libaub = static_library(
23 files('aub_read.c', 'aub_mem.c'),
24 include_directories : [inc_common, inc_intel],
25 dependencies : idep_mesautil,
26 link_with : [libintel_common, libintel_dev],
27 c_args : [c_vis_args, no_override_init_args],
31 aubinator = executable(
34 dependencies : [idep_mesautil, dep_expat, dep_zlib, dep_dl, dep_thread, dep_m],
35 include_directories : [inc_common, inc_intel],
36 link_with : [libintel_common, libintel_compiler, libintel_dev, libaub],
37 c_args : [c_vis_args, no_override_init_args],
41 aubinator_error_decode = executable(
42 'aubinator_error_decode',
43 files('aubinator_error_decode.c'),
44 dependencies : [idep_mesautil, dep_zlib, dep_thread],
45 include_directories : [inc_common, inc_intel],
46 link_with : [libintel_common, libintel_compiler, libintel_dev],
47 c_args : [c_vis_args, no_override_init_args],
51 i965_disasm = executable(
53 files('i965_disasm.c'),
54 dependencies : [idep_mesautil, dep_thread],
55 include_directories : [inc_common, inc_intel],
56 link_with : [libintel_common, libintel_compiler, libintel_dev],
57 c_args : [c_vis_args, no_override_init_args],
61 error2aub = executable(
63 files('aub_write.h', 'aub_write.c', 'error2aub.c'),
64 dependencies : [dep_zlib, dep_dl, dep_thread, dep_m],
65 include_directories : [inc_common, inc_intel, inc_include],
66 link_with : [libintel_dev],
67 c_args : [c_vis_args, no_override_init_args],
71 sanitize_data = configuration_data()
74 join_paths(get_option('prefix'), get_option('libexecdir'))
77 input : 'intel_sanitize_gpu.in',
78 output : '@BASENAME@',
79 install_dir : get_option('bindir'),
81 configuration : sanitize_data
84 libintel_sanitize_gpu = shared_library(
86 files('intel_sanitize_gpu.c'),
87 dependencies : [idep_mesautil, dep_dl, dep_thread],
88 include_directories : [inc_common, inc_intel, inc_include],
89 link_with : libintel_common,
90 c_args : [c_vis_args, no_override_init_args, c_sse2_args],
91 install_dir : get_option('libexecdir'),
96 input : 'intel_dump_gpu.in',
97 output : '@BASENAME@',
98 install_dir : get_option('bindir'),
99 configuration : sanitize_data,
103 libintel_dump_gpu = shared_library(
106 'gen_context.h', 'gen8_context.h', 'gen10_context.h', 'intel_aub.h',
107 'aub_write.h', 'aub_write.c', 'intel_dump_gpu.c',
109 dependencies : dep_dl,
110 include_directories : [inc_common, inc_intel, inc_include],
111 link_with : libintel_dev,
112 c_args : [c_vis_args, no_override_init_args],
113 install_dir : get_option('libexecdir'),
117 if with_tools.contains('intel-ui')
120 aubinator_viewer = executable(
122 files('aubinator_viewer.cpp', 'aubinator_viewer_decoder.cpp'),
123 dependencies : [idep_mesautil, dep_zlib, dep_dl, dep_thread, dep_m, libintel_imgui_gtk_dep],
124 include_directories : [inc_common, inc_intel],
125 link_with : [libintel_common, libintel_compiler, libintel_dev, libaub],
126 c_args : [c_vis_args, no_override_init_args],
127 cpp_args : ['-fpermissive', '-Wno-parentheses', '-Wno-class-memaccess'],
132 i965_gram_tab = custom_target(
133 'i965_gram.tab.[ch]',
134 input : 'i965_gram.y',
135 output : ['i965_gram.tab.c', 'i965_gram.tab.h'],
137 prog_bison, '@INPUT@', '--defines=@OUTPUT1@',
142 i965_lex_yy_c = custom_target(
144 input : 'i965_lex.l',
145 output : 'i965_lex.yy.c',
146 command : [prog_flex, '-o', '@OUTPUT@', '@INPUT@']
149 i965_asm = executable(
151 ['i965_asm.c', i965_gram_tab[0], i965_gram_tab[1], i965_lex_yy_c],
152 dependencies : [idep_mesautil, dep_thread],
153 include_directories : [inc_common, inc_intel],
154 link_with : [libintel_common, libintel_compiler, libintel_dev],
155 c_args : [c_vis_args, no_override_init_args],
160 ['brw', 'tests/gen4'],
161 ['g4x', 'tests/gen4.5'],
162 ['ilk', 'tests/gen5'],
163 ['snb', 'tests/gen6'],
164 ['ivb', 'tests/gen7'],
165 ['hsw', 'tests/gen7.5'],
166 ['bdw', 'tests/gen8'],
167 ['skl', 'tests/gen9'],
168 ['icl', 'tests/gen11'],
171 test_runner = find_program('tests/run-test.sh')
172 foreach testcase : asm_testcases
173 test('i965_asm : ' + testcase[1], test_runner,
174 args : [i965_asm, testcase[1], testcase[0]],
175 env : ['srcdir=' + meson.current_source_dir()])