Path: blob/21.2-virgl/src/gallium/drivers/freedreno/meson.build
4570 views
# Copyright © 2017 Rob Clark12# Permission is hereby granted, free of charge, to any person obtaining a copy3# of this software and associated documentation files (the "Software"), to deal4# in the Software without restriction, including without limitation the rights5# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell6# copies of the Software, and to permit persons to whom the Software is7# furnished to do so, subject to the following conditions:89# The above copyright notice and this permission notice shall be included in10# all copies or substantial portions of the Software.1112# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR13# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,14# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE15# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER16# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,17# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE18# SOFTWARE.1920files_libfreedreno = files(21'freedreno_autotune.c',22'freedreno_autotune.h',23'freedreno_batch.c',24'freedreno_batch.h',25'freedreno_batch_cache.c',26'freedreno_batch_cache.h',27'freedreno_blitter.c',28'freedreno_blitter.h',29'freedreno_context.c',30'freedreno_context.h',31'freedreno_draw.c',32'freedreno_draw.h',33'freedreno_fence.c',34'freedreno_fence.h',35'freedreno_gmem.c',36'freedreno_gmem.h',37'freedreno_program.c',38'freedreno_program.h',39'freedreno_query.c',40'freedreno_query.h',41'freedreno_query_acc.c',42'freedreno_query_acc.h',43'freedreno_query_hw.c',44'freedreno_query_hw.h',45'freedreno_query_sw.c',46'freedreno_query_sw.h',47'freedreno_resource.c',48'freedreno_resource.h',49'freedreno_screen.c',50'freedreno_screen.h',51'freedreno_state.c',52'freedreno_state.h',53'freedreno_surface.c',54'freedreno_surface.h',55'freedreno_texture.c',56'freedreno_texture.h',57'freedreno_util.c',58'freedreno_util.h',59'a2xx/fd2_blend.c',60'a2xx/fd2_blend.h',61'a2xx/fd2_context.c',62'a2xx/fd2_context.h',63'a2xx/fd2_draw.c',64'a2xx/fd2_draw.h',65'a2xx/fd2_emit.c',66'a2xx/fd2_emit.h',67'a2xx/fd2_gmem.c',68'a2xx/fd2_gmem.h',69'a2xx/fd2_program.c',70'a2xx/fd2_program.h',71'a2xx/fd2_query.c',72'a2xx/fd2_query.h',73'a2xx/fd2_rasterizer.c',74'a2xx/fd2_rasterizer.h',75'a2xx/fd2_resource.c',76'a2xx/fd2_resource.h',77'a2xx/fd2_screen.c',78'a2xx/fd2_screen.h',79'a2xx/fd2_texture.c',80'a2xx/fd2_texture.h',81'a2xx/fd2_util.c',82'a2xx/fd2_util.h',83'a2xx/fd2_zsa.c',84'a2xx/fd2_zsa.h',85'a2xx/ir2.c',86'a2xx/ir2.h',87'a2xx/ir2_assemble.c',88'a2xx/ir2_cp.c',89'a2xx/ir2_nir.c',90'a2xx/ir2_private.h',91'a2xx/ir2_ra.c',92'a3xx/fd3_blend.c',93'a3xx/fd3_blend.h',94'a3xx/fd3_context.c',95'a3xx/fd3_context.h',96'a3xx/fd3_draw.c',97'a3xx/fd3_draw.h',98'a3xx/fd3_emit.c',99'a3xx/fd3_emit.h',100'a3xx/fd3_format.c',101'a3xx/fd3_format.h',102'a3xx/fd3_gmem.c',103'a3xx/fd3_gmem.h',104'a3xx/fd3_program.c',105'a3xx/fd3_program.h',106'a3xx/fd3_query.c',107'a3xx/fd3_query.h',108'a3xx/fd3_rasterizer.c',109'a3xx/fd3_rasterizer.h',110'a3xx/fd3_resource.c',111'a3xx/fd3_resource.h',112'a3xx/fd3_screen.c',113'a3xx/fd3_screen.h',114'a3xx/fd3_texture.c',115'a3xx/fd3_texture.h',116'a3xx/fd3_zsa.c',117'a3xx/fd3_zsa.h',118'a4xx/fd4_blend.c',119'a4xx/fd4_blend.h',120'a4xx/fd4_context.c',121'a4xx/fd4_context.h',122'a4xx/fd4_draw.c',123'a4xx/fd4_draw.h',124'a4xx/fd4_emit.c',125'a4xx/fd4_emit.h',126'a4xx/fd4_format.c',127'a4xx/fd4_format.h',128'a4xx/fd4_gmem.c',129'a4xx/fd4_gmem.h',130'a4xx/fd4_program.c',131'a4xx/fd4_program.h',132'a4xx/fd4_query.c',133'a4xx/fd4_query.h',134'a4xx/fd4_rasterizer.c',135'a4xx/fd4_rasterizer.h',136'a4xx/fd4_resource.c',137'a4xx/fd4_resource.h',138'a4xx/fd4_screen.c',139'a4xx/fd4_screen.h',140'a4xx/fd4_texture.c',141'a4xx/fd4_texture.h',142'a4xx/fd4_zsa.c',143'a4xx/fd4_zsa.h',144'a5xx/fd5_blend.c',145'a5xx/fd5_blend.h',146'a5xx/fd5_blitter.c',147'a5xx/fd5_blitter.h',148'a5xx/fd5_compute.c',149'a5xx/fd5_compute.h',150'a5xx/fd5_context.c',151'a5xx/fd5_context.h',152'a5xx/fd5_draw.c',153'a5xx/fd5_draw.h',154'a5xx/fd5_emit.c',155'a5xx/fd5_emit.h',156'a5xx/fd5_format.c',157'a5xx/fd5_format.h',158'a5xx/fd5_gmem.c',159'a5xx/fd5_gmem.h',160'a5xx/fd5_image.c',161'a5xx/fd5_image.h',162'a5xx/fd5_program.c',163'a5xx/fd5_program.h',164'a5xx/fd5_query.c',165'a5xx/fd5_query.h',166'a5xx/fd5_rasterizer.c',167'a5xx/fd5_rasterizer.h',168'a5xx/fd5_resource.c',169'a5xx/fd5_resource.h',170'a5xx/fd5_screen.c',171'a5xx/fd5_screen.h',172'a5xx/fd5_texture.c',173'a5xx/fd5_texture.h',174'a5xx/fd5_zsa.c',175'a5xx/fd5_zsa.h',176'a6xx/fd6_blend.c',177'a6xx/fd6_blend.h',178'a6xx/fd6_blitter.c',179'a6xx/fd6_blitter.h',180'a6xx/fd6_compute.c',181'a6xx/fd6_compute.h',182'a6xx/fd6_const.c',183'a6xx/fd6_const.h',184'a6xx/fd6_context.c',185'a6xx/fd6_context.h',186'a6xx/fd6_draw.c',187'a6xx/fd6_draw.h',188'a6xx/fd6_emit.c',189'a6xx/fd6_emit.h',190'a6xx/fd6_format.c',191'a6xx/fd6_format.h',192'a6xx/fd6_gmem.c',193'a6xx/fd6_gmem.h',194'a6xx/fd6_image.c',195'a6xx/fd6_image.h',196'a6xx/fd6_program.c',197'a6xx/fd6_program.h',198'a6xx/fd6_query.c',199'a6xx/fd6_query.h',200'a6xx/fd6_rasterizer.c',201'a6xx/fd6_rasterizer.h',202'a6xx/fd6_resource.c',203'a6xx/fd6_resource.h',204'a6xx/fd6_screen.c',205'a6xx/fd6_screen.h',206'a6xx/fd6_texture.c',207'a6xx/fd6_texture.h',208'a6xx/fd6_vsc.c',209'a6xx/fd6_vsc.h',210'a6xx/fd6_zsa.c',211'a6xx/fd6_zsa.h',212'ir3/ir3_cache.c',213'ir3/ir3_cache.h',214'ir3/ir3_const.h',215'ir3/ir3_gallium.c',216'ir3/ir3_gallium.h',217)218219freedreno_tracepoints = custom_target(220'freedreno_tracepoints.[ch]',221input: 'freedreno_tracepoints.py',222output: ['freedreno_tracepoints.c', 'freedreno_tracepoints.h'],223command: [224prog_python, '@INPUT@',225'-p', join_paths(meson.source_root(), 'src/gallium/auxiliary/util/'),226'-C', '@OUTPUT0@',227'-H', '@OUTPUT1@',228],229depend_files: u_trace_py,230)231232files_libfreedreno += freedreno_tracepoints233234freedreno_includes = [235inc_mesa, inc_mapi,236inc_src, inc_include, inc_gallium, inc_gallium_aux,237inc_freedreno, include_directories('ir3'),238]239240freedreno_c_args = [no_override_init_args]241if cc.has_argument('-Wpacked-bitfield-compat')242freedreno_c_args += '-Wno-packed-bitfield-compat'243endif244245freedreno_cpp_args = []246if cpp.has_argument('-Wpacked-bitfield-compat')247freedreno_cpp_args += '-Wno-packed-bitfield-compat'248endif249250libfreedreno_dependencies = [251dep_libdrm,252idep_mesautil,253idep_nir_headers,254idep_libfreedreno_common,255idep_u_tracepoints,256]257258if with_perfetto259libfreedreno_dependencies += dep_perfetto260files_libfreedreno += 'freedreno_perfetto.cc'261endif262263# The header file ends up part of the build (but just a stub)264# in either case:265files_libfreedreno += 'freedreno_perfetto.h'266267libfreedreno = static_library(268'freedreno',269[files_libfreedreno, freedreno_xml_header_files],270include_directories : freedreno_includes,271c_args : [freedreno_c_args],272cpp_args : [freedreno_cpp_args],273gnu_symbol_visibility : 'hidden',274dependencies : libfreedreno_dependencies,275)276277driver_freedreno = declare_dependency(278compile_args : '-DGALLIUM_FREEDRENO',279link_with : [280libfreedrenowinsys,281libfreedreno,282libfreedreno_drm,283libfreedreno_ir2,284libfreedreno_ir3,285libfreedreno_layout,286libfreedreno_perfcntrs287],288dependencies : idep_nir,289)290291ir3_compiler = executable(292'ir3_compiler',293'ir3/ir3_cmdline.c',294include_directories : freedreno_includes,295dependencies : [296idep_nir,297idep_mesautil,298],299link_with : [300libfreedreno,301libfreedreno_drm,302libfreedreno_ir3,303libfreedreno_layout,304libgallium,305libglsl_standalone,306],307build_by_default : with_tools.contains('freedreno'),308install : false,309)310311gmemtool = executable(312'gmemtool',313[314'gmemtool.c',315freedreno_tracepoints[1]316],317include_directories : freedreno_includes,318dependencies : [319idep_nir,320idep_mesautil,321idep_u_tracepoints,322],323link_with : [324libfreedreno,325libfreedreno_drm,326libfreedreno_ir2,327libfreedreno_ir3,328libfreedreno_layout,329libgallium,330libglsl_standalone,331libfreedreno_perfcntrs,332],333build_by_default : with_tools.contains('freedreno'),334install : false,335)336337338