meson.build revision 01e04c3f
101e04c3fSmrg# Copyright © 2017 Intel Corporation
201e04c3fSmrg
301e04c3fSmrg# Permission is hereby granted, free of charge, to any person obtaining a copy
401e04c3fSmrg# of this software and associated documentation files (the "Software"), to deal
501e04c3fSmrg# in the Software without restriction, including without limitation the rights
601e04c3fSmrg# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
701e04c3fSmrg# copies of the Software, and to permit persons to whom the Software is
801e04c3fSmrg# furnished to do so, subject to the following conditions:
901e04c3fSmrg
1001e04c3fSmrg# The above copyright notice and this permission notice shall be included in
1101e04c3fSmrg# all copies or substantial portions of the Software.
1201e04c3fSmrg
1301e04c3fSmrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1401e04c3fSmrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1501e04c3fSmrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1601e04c3fSmrg# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1701e04c3fSmrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1801e04c3fSmrg# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1901e04c3fSmrg# SOFTWARE.
2001e04c3fSmrg
2101e04c3fSmrglibintel_compiler_files = files(
2201e04c3fSmrg  'brw_cfg.cpp',
2301e04c3fSmrg  'brw_cfg.h',
2401e04c3fSmrg  'brw_clip.h',
2501e04c3fSmrg  'brw_clip_line.c',
2601e04c3fSmrg  'brw_clip_point.c',
2701e04c3fSmrg  'brw_clip_tri.c',
2801e04c3fSmrg  'brw_clip_unfilled.c',
2901e04c3fSmrg  'brw_clip_util.c',
3001e04c3fSmrg  'brw_compile_clip.c',
3101e04c3fSmrg  'brw_compile_sf.c',
3201e04c3fSmrg  'brw_compiler.c',
3301e04c3fSmrg  'brw_compiler.h',
3401e04c3fSmrg  'brw_dead_control_flow.cpp',
3501e04c3fSmrg  'brw_dead_control_flow.h',
3601e04c3fSmrg  'brw_disasm.c',
3701e04c3fSmrg  'brw_disasm_info.c',
3801e04c3fSmrg  'brw_disasm_info.h',
3901e04c3fSmrg  'brw_eu.c',
4001e04c3fSmrg  'brw_eu_compact.c',
4101e04c3fSmrg  'brw_eu_defines.h',
4201e04c3fSmrg  'brw_eu_emit.c',
4301e04c3fSmrg  'brw_eu.h',
4401e04c3fSmrg  'brw_eu_util.c',
4501e04c3fSmrg  'brw_eu_validate.c',
4601e04c3fSmrg  'brw_fs_bank_conflicts.cpp',
4701e04c3fSmrg  'brw_fs_builder.h',
4801e04c3fSmrg  'brw_fs_cmod_propagation.cpp',
4901e04c3fSmrg  'brw_fs_combine_constants.cpp',
5001e04c3fSmrg  'brw_fs_copy_propagation.cpp',
5101e04c3fSmrg  'brw_fs.cpp',
5201e04c3fSmrg  'brw_fs_cse.cpp',
5301e04c3fSmrg  'brw_fs_dead_code_eliminate.cpp',
5401e04c3fSmrg  'brw_fs_generator.cpp',
5501e04c3fSmrg  'brw_fs.h',
5601e04c3fSmrg  'brw_fs_live_variables.cpp',
5701e04c3fSmrg  'brw_fs_live_variables.h',
5801e04c3fSmrg  'brw_fs_lower_conversions.cpp',
5901e04c3fSmrg  'brw_fs_lower_pack.cpp',
6001e04c3fSmrg  'brw_fs_nir.cpp',
6101e04c3fSmrg  'brw_fs_reg_allocate.cpp',
6201e04c3fSmrg  'brw_fs_register_coalesce.cpp',
6301e04c3fSmrg  'brw_fs_saturate_propagation.cpp',
6401e04c3fSmrg  'brw_fs_sel_peephole.cpp',
6501e04c3fSmrg  'brw_fs_surface_builder.cpp',
6601e04c3fSmrg  'brw_fs_surface_builder.h',
6701e04c3fSmrg  'brw_fs_validate.cpp',
6801e04c3fSmrg  'brw_fs_visitor.cpp',
6901e04c3fSmrg  'brw_inst.h',
7001e04c3fSmrg  'brw_interpolation_map.c',
7101e04c3fSmrg  'brw_ir_allocator.h',
7201e04c3fSmrg  'brw_ir_fs.h',
7301e04c3fSmrg  'brw_ir_vec4.h',
7401e04c3fSmrg  'brw_nir.h',
7501e04c3fSmrg  'brw_nir.c',
7601e04c3fSmrg  'brw_nir_analyze_boolean_resolves.c',
7701e04c3fSmrg  'brw_nir_analyze_ubo_ranges.c',
7801e04c3fSmrg  'brw_nir_attribute_workarounds.c',
7901e04c3fSmrg  'brw_nir_lower_cs_intrinsics.c',
8001e04c3fSmrg  'brw_nir_lower_image_load_store.c',
8101e04c3fSmrg  'brw_nir_opt_peephole_ffma.c',
8201e04c3fSmrg  'brw_nir_tcs_workarounds.c',
8301e04c3fSmrg  'brw_packed_float.c',
8401e04c3fSmrg  'brw_predicated_break.cpp',
8501e04c3fSmrg  'brw_reg.h',
8601e04c3fSmrg  'brw_reg_type.c',
8701e04c3fSmrg  'brw_reg_type.h',
8801e04c3fSmrg  'brw_schedule_instructions.cpp',
8901e04c3fSmrg  'brw_shader.cpp',
9001e04c3fSmrg  'brw_shader.h',
9101e04c3fSmrg  'brw_vec4_builder.h',
9201e04c3fSmrg  'brw_vec4_cmod_propagation.cpp',
9301e04c3fSmrg  'brw_vec4_copy_propagation.cpp',
9401e04c3fSmrg  'brw_vec4.cpp',
9501e04c3fSmrg  'brw_vec4_cse.cpp',
9601e04c3fSmrg  'brw_vec4_dead_code_eliminate.cpp',
9701e04c3fSmrg  'brw_vec4_generator.cpp',
9801e04c3fSmrg  'brw_vec4_gs_visitor.cpp',
9901e04c3fSmrg  'brw_vec4_gs_visitor.h',
10001e04c3fSmrg  'brw_vec4.h',
10101e04c3fSmrg  'brw_vec4_live_variables.cpp',
10201e04c3fSmrg  'brw_vec4_live_variables.h',
10301e04c3fSmrg  'brw_vec4_nir.cpp',
10401e04c3fSmrg  'brw_vec4_gs_nir.cpp',
10501e04c3fSmrg  'brw_vec4_reg_allocate.cpp',
10601e04c3fSmrg  'brw_vec4_surface_builder.cpp',
10701e04c3fSmrg  'brw_vec4_surface_builder.h',
10801e04c3fSmrg  'brw_vec4_tcs.cpp',
10901e04c3fSmrg  'brw_vec4_tcs.h',
11001e04c3fSmrg  'brw_vec4_tes.cpp',
11101e04c3fSmrg  'brw_vec4_tes.h',
11201e04c3fSmrg  'brw_vec4_visitor.cpp',
11301e04c3fSmrg  'brw_vec4_vs_visitor.cpp',
11401e04c3fSmrg  'brw_vec4_vs.h',
11501e04c3fSmrg  'brw_vue_map.c',
11601e04c3fSmrg  'brw_wm_iz.cpp',
11701e04c3fSmrg  'gen6_gs_visitor.cpp',
11801e04c3fSmrg  'gen6_gs_visitor.h',
11901e04c3fSmrg)
12001e04c3fSmrg
12101e04c3fSmrgbrw_nir_trig = custom_target(
12201e04c3fSmrg  'brw_nir_trig_workarounds.c',
12301e04c3fSmrg  input : 'brw_nir_trig_workarounds.py',
12401e04c3fSmrg  output : 'brw_nir_trig_workarounds.c',
12501e04c3fSmrg  command : [
12601e04c3fSmrg    prog_python, '@INPUT@',
12701e04c3fSmrg    '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
12801e04c3fSmrg  ],
12901e04c3fSmrg  depend_files : nir_algebraic_py,
13001e04c3fSmrg  capture : true,
13101e04c3fSmrg)
13201e04c3fSmrg
13301e04c3fSmrglibintel_compiler = static_library(
13401e04c3fSmrg  'intel_compiler',
13501e04c3fSmrg  [libintel_compiler_files, brw_nir_trig, ir_expression_operation_h],
13601e04c3fSmrg  include_directories : [inc_common, inc_intel],
13701e04c3fSmrg  c_args : [c_vis_args, no_override_init_args],
13801e04c3fSmrg  cpp_args : [cpp_vis_args],
13901e04c3fSmrg  dependencies : idep_nir_headers,
14001e04c3fSmrg  build_by_default : false,
14101e04c3fSmrg)
14201e04c3fSmrg
14301e04c3fSmrgif with_tests
14401e04c3fSmrg  # The last two tests are not C++ or gtest, pre comment in autotools make
14501e04c3fSmrg  foreach t : ['fs_cmod_propagation', 'fs_copy_propagation',
14601e04c3fSmrg               'fs_saturate_propagation', 'vf_float_conversions',
14701e04c3fSmrg               'vec4_register_coalesce', 'vec4_copy_propagation',
14801e04c3fSmrg               'vec4_cmod_propagation', 'vec4_dead_code_eliminate',
14901e04c3fSmrg               'eu_compact', 'eu_validate']
15001e04c3fSmrg    test(
15101e04c3fSmrg      t,
15201e04c3fSmrg      executable(
15301e04c3fSmrg        [t, ir_expression_operation_h],
15401e04c3fSmrg        'test_@0@.cpp'.format(t),
15501e04c3fSmrg        include_directories : [inc_common, inc_intel],
15601e04c3fSmrg        link_with : [
15701e04c3fSmrg          libintel_compiler, libintel_common, libintel_dev, libmesa_util, libisl,
15801e04c3fSmrg        ],
15901e04c3fSmrg        dependencies : [dep_thread, dep_dl, idep_gtest, idep_nir],
16001e04c3fSmrg      )
16101e04c3fSmrg    )
16201e04c3fSmrg  endforeach
16301e04c3fSmrgendif
164