Path: blob/21.2-virgl/src/gallium/auxiliary/meson.build
4560 views
# Copyright © 2017 Dylan Baker12# 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_libgallium = files(21'cso_cache/cso_cache.c',22'cso_cache/cso_cache.h',23'cso_cache/cso_context.c',24'cso_cache/cso_context.h',25'cso_cache/cso_hash.c',26'cso_cache/cso_hash.h',27'draw/draw_cliptest_tmp.h',28'draw/draw_context.c',29'draw/draw_context.h',30'draw/draw_decompose_tmp.h',31'draw/draw_fs.c',32'draw/draw_fs.h',33'draw/draw_gs.c',34'draw/draw_gs.h',35'draw/draw_gs_tmp.h',36'draw/draw_pipe_aaline.c',37'draw/draw_pipe_aapoint.c',38'draw/draw_pipe.c',39'draw/draw_pipe.h',40'draw/draw_pipe_clip.c',41'draw/draw_pipe_cull.c',42'draw/draw_pipe_flatshade.c',43'draw/draw_pipe_offset.c',44'draw/draw_pipe_pstipple.c',45'draw/draw_pipe_stipple.c',46'draw/draw_pipe_twoside.c',47'draw/draw_pipe_unfilled.c',48'draw/draw_pipe_user_cull.c',49'draw/draw_pipe_util.c',50'draw/draw_pipe_validate.c',51'draw/draw_pipe_vbuf.c',52'draw/draw_pipe_wide_line.c',53'draw/draw_pipe_wide_point.c',54'draw/draw_prim_assembler.c',55'draw/draw_prim_assembler.h',56'draw/draw_prim_assembler_tmp.h',57'draw/draw_private.h',58'draw/draw_pt.c',59'draw/draw_pt_decompose.h',60'draw/draw_pt_emit.c',61'draw/draw_pt_fetch.c',62'draw/draw_pt_fetch_shade_emit.c',63'draw/draw_pt_fetch_shade_pipeline.c',64'draw/draw_pt.h',65'draw/draw_pt_post_vs.c',66'draw/draw_pt_so_emit.c',67'draw/draw_pt_util.c',68'draw/draw_pt_vsplit.c',69'draw/draw_pt_vsplit_tmp.h',70'draw/draw_so_emit_tmp.h',71'draw/draw_split_tmp.h',72'draw/draw_tess.c',73'draw/draw_tess.h',74'draw/draw_vbuf.h',75'draw/draw_vertex.c',76'draw/draw_vertex.h',77'draw/draw_vs.c',78'draw/draw_vs_exec.c',79'draw/draw_vs.h',80'draw/draw_vs_variant.c',81'driver_ddebug/dd_context.c',82'driver_ddebug/dd_draw.c',83'driver_ddebug/dd_pipe.h',84'driver_ddebug/dd_public.h',85'driver_ddebug/dd_screen.c',86'driver_ddebug/dd_util.h',87'driver_noop/noop_pipe.c',88'driver_noop/noop_public.h',89'driver_noop/noop_state.c',90'driver_rbug/rbug_context.c',91'driver_rbug/rbug_context.h',92'driver_rbug/rbug_core.c',93'driver_rbug/rbug_objects.c',94'driver_rbug/rbug_objects.h',95'driver_rbug/rbug_public.h',96'driver_rbug/rbug_screen.c',97'driver_rbug/rbug_screen.h',98'driver_trace/tr_context.c',99'driver_trace/tr_context.h',100'driver_trace/tr_dump.c',101'driver_trace/tr_dump_defines.h',102'driver_trace/tr_dump.h',103'driver_trace/tr_dump_state.c',104'driver_trace/tr_dump_state.h',105'driver_trace/tr_public.h',106'driver_trace/tr_screen.c',107'driver_trace/tr_screen.h',108'driver_trace/tr_texture.c',109'driver_trace/tr_texture.h',110'hud/font.c',111'hud/font.h',112'hud/hud_context.c',113'hud/hud_context.h',114'hud/hud_cpu.c',115'hud/hud_nic.c',116'hud/hud_cpufreq.c',117'hud/hud_diskstat.c',118'hud/hud_sensors_temp.c',119'hud/hud_driver_query.c',120'hud/hud_fps.c',121'hud/hud_private.h',122'indices/u_indices.h',123'indices/u_indices_priv.h',124'indices/u_primconvert.c',125'indices/u_primconvert.h',126'os/os_mman.h',127'os/os_process.c',128'os/os_process.h',129'os/os_thread.h',130'pipebuffer/pb_buffer_fenced.c',131'pipebuffer/pb_buffer_fenced.h',132'pipebuffer/pb_buffer.h',133'pipebuffer/pb_bufmgr_cache.c',134'pipebuffer/pb_bufmgr_debug.c',135'pipebuffer/pb_bufmgr.h',136'pipebuffer/pb_bufmgr_mm.c',137'pipebuffer/pb_bufmgr_slab.c',138'pipebuffer/pb_cache.c',139'pipebuffer/pb_cache.h',140'pipebuffer/pb_slab.c',141'pipebuffer/pb_slab.h',142'pipebuffer/pb_validate.c',143'pipebuffer/pb_validate.h',144'postprocess/filters.h',145'postprocess/postprocess.h',146'postprocess/pp_celshade.c',147'postprocess/pp_celshade.h',148'postprocess/pp_colors.c',149'postprocess/pp_colors.h',150'postprocess/pp_filters.h',151'postprocess/pp_init.c',152'postprocess/pp_mlaa_areamap.h',153'postprocess/pp_mlaa.c',154'postprocess/pp_mlaa.h',155'postprocess/pp_private.h',156'postprocess/pp_program.c',157'postprocess/pp_run.c',158'rbug/rbug_connection.c',159'rbug/rbug_connection.h',160'rbug/rbug_context.c',161'rbug/rbug_context.h',162'rbug/rbug_core.c',163'rbug/rbug_core.h',164'rbug/rbug_demarshal.c',165'rbug/rbug.h',166'rbug/rbug_internal.h',167'rbug/rbug_proto.h',168'rbug/rbug_shader.c',169'rbug/rbug_shader.h',170'rbug/rbug_texture.c',171'rbug/rbug_texture.h',172'rtasm/rtasm_cpu.c',173'rtasm/rtasm_cpu.h',174'rtasm/rtasm_execmem.c',175'rtasm/rtasm_execmem.h',176'rtasm/rtasm_x86sse.c',177'rtasm/rtasm_x86sse.h',178'tgsi/tgsi_aa_point.c',179'tgsi/tgsi_aa_point.h',180'tgsi/tgsi_build.c',181'tgsi/tgsi_build.h',182'tgsi/tgsi_dump.c',183'tgsi/tgsi_dump.h',184'tgsi/tgsi_dynamic_indexing.c',185'tgsi/tgsi_exec.c',186'tgsi/tgsi_exec.h',187'tgsi/tgsi_emulate.c',188'tgsi/tgsi_emulate.h',189'tgsi/tgsi_from_mesa.c',190'tgsi/tgsi_from_mesa.h',191'tgsi/tgsi_info.c',192'tgsi/tgsi_info.h',193'tgsi/tgsi_info_opcodes.h',194'tgsi/tgsi_iterate.c',195'tgsi/tgsi_iterate.h',196'tgsi/tgsi_lowering.c',197'tgsi/tgsi_lowering.h',198'tgsi/tgsi_opcode_tmp.h',199'tgsi/tgsi_parse.c',200'tgsi/tgsi_parse.h',201'tgsi/tgsi_point_sprite.c',202'tgsi/tgsi_point_sprite.h',203'tgsi/tgsi_sanity.c',204'tgsi/tgsi_sanity.h',205'tgsi/tgsi_scan.c',206'tgsi/tgsi_scan.h',207'tgsi/tgsi_strings.c',208'tgsi/tgsi_strings.h',209'tgsi/tgsi_text.c',210'tgsi/tgsi_text.h',211'tgsi/tgsi_transform.c',212'tgsi/tgsi_transform.h',213'tgsi/tgsi_two_side.c',214'tgsi/tgsi_two_side.h',215'tgsi/tgsi_ureg.c',216'tgsi/tgsi_ureg.h',217'tgsi/tgsi_util.c',218'tgsi/tgsi_util.h',219'tgsi/tgsi_vpos.c',220'translate/translate.c',221'translate/translate.h',222'translate/translate_cache.c',223'translate/translate_cache.h',224'translate/translate_generic.c',225'translate/translate_sse.c',226'util/dbghelp.h',227'util/u_async_debug.h',228'util/u_async_debug.c',229'util/u_bitcast.h',230'util/u_bitmask.c',231'util/u_bitmask.h',232'util/u_blend.h',233'util/u_blitter.c',234'util/u_blitter.h',235'util/u_box.h',236'util/u_cache.c',237'util/u_cache.h',238'util/u_compute.c',239'util/u_compute.h',240'util/u_debug_describe.c',241'util/u_debug_describe.h',242'util/u_debug_flush.c',243'util/u_debug_flush.h',244'util/u_debug_image.c',245'util/u_debug_image.h',246'util/u_debug_refcnt.c',247'util/u_debug_refcnt.h',248'util/u_dirty_flags.h',249'util/u_dirty_surfaces.h',250'util/u_dl.c',251'util/u_dl.h',252'util/u_draw.c',253'util/u_draw.h',254'util/u_draw_quad.c',255'util/u_draw_quad.h',256'util/u_dual_blend.h',257'util/u_dump_defines.c',258'util/u_dump.h',259'util/u_dump_state.c',260'util/u_fifo.h',261'util/u_framebuffer.c',262'util/u_framebuffer.h',263'util/u_gen_mipmap.c',264'util/u_gen_mipmap.h',265'util/u_handle_table.c',266'util/u_handle_table.h',267'util/u_hash_table.c',268'util/u_hash_table.h',269'util/u_helpers.c',270'util/u_helpers.h',271'util/u_index_modify.c',272'util/u_index_modify.h',273'util/u_inlines.h',274'util/u_linear.c',275'util/u_linear.h',276'util/u_live_shader_cache.c',277'util/u_live_shader_cache.h',278'util/u_log.c',279'util/u_log.h',280'util/u_network.c',281'util/u_network.h',282'util/u_pack_color.h',283'util/u_pointer.h',284'util/u_prim.h',285'util/u_prim.c',286'util/u_prim_restart.c',287'util/u_prim_restart.h',288'util/u_pstipple.c',289'util/u_pstipple.h',290'util/u_pwr8.h',291'util/u_range.h',292'util/u_rect.h',293'util/u_resource.c',294'util/u_resource.h',295'util/u_sampler.c',296'util/u_sampler.h',297'util/u_screen.c',298'util/u_screen.h',299'util/u_simple_shaders.c',300'util/u_simple_shaders.h',301'util/u_split_draw.c',302'util/u_split_draw.h',303'util/u_split_prim.h',304'util/u_sse.h',305'util/u_suballoc.c',306'util/u_suballoc.h',307'util/u_surface.c',308'util/u_surface.h',309'util/u_tests.c',310'util/u_tests.h',311'util/u_texture.c',312'util/u_texture.h',313'util/u_tile.c',314'util/u_tile.h',315'util/u_trace.c',316'util/u_trace.h',317'util/u_trace_priv.h',318'util/u_transfer.c',319'util/u_transfer.h',320'util/u_transfer_helper.c',321'util/u_transfer_helper.h',322'util/u_threaded_context.c',323'util/u_threaded_context.h',324'util/u_threaded_context_calls.h',325'util/u_upload_mgr.c',326'util/u_upload_mgr.h',327'util/u_vbuf.c',328'util/u_vbuf.h',329'util/u_video.h',330'util/u_viewport.h',331'nir/tgsi_to_nir.c',332'nir/tgsi_to_nir.h',333'nir/nir_to_tgsi.c',334'nir/nir_to_tgsi.h',335'nir/nir_draw_helpers.c',336'nir/nir_draw_helpers.h',337)338339if dep_libdrm.found()340files_libgallium += files(341'renderonly/renderonly.c',342'renderonly/renderonly.h',343)344endif345346if draw_with_llvm347files_libgallium += files(348'gallivm/lp_bld_arit.c',349'gallivm/lp_bld_arit.h',350'gallivm/lp_bld_arit_overflow.c',351'gallivm/lp_bld_arit_overflow.h',352'gallivm/lp_bld_assert.c',353'gallivm/lp_bld_assert.h',354'gallivm/lp_bld_bitarit.c',355'gallivm/lp_bld_bitarit.h',356'gallivm/lp_bld_const.c',357'gallivm/lp_bld_const.h',358'gallivm/lp_bld_conv.c',359'gallivm/lp_bld_conv.h',360'gallivm/lp_bld_coro.c',361'gallivm/lp_bld_coro.h',362'gallivm/lp_bld_debug.cpp',363'gallivm/lp_bld_debug.h',364'gallivm/lp_bld_flow.c',365'gallivm/lp_bld_flow.h',366'gallivm/lp_bld_format_aos_array.c',367'gallivm/lp_bld_format_aos.c',368'gallivm/lp_bld_format_float.c',369'gallivm/lp_bld_format_s3tc.c',370'gallivm/lp_bld_format.c',371'gallivm/lp_bld_format.h',372'gallivm/lp_bld_format_soa.c',373'gallivm/lp_bld_format_srgb.c',374'gallivm/lp_bld_format_yuv.c',375'gallivm/lp_bld_gather.c',376'gallivm/lp_bld_gather.h',377'gallivm/lp_bld.h',378'gallivm/lp_bld_init.c',379'gallivm/lp_bld_init.h',380'gallivm/lp_bld_intr.c',381'gallivm/lp_bld_intr.h',382'gallivm/lp_bld_ir_common.c',383'gallivm/lp_bld_ir_common.h',384'gallivm/lp_bld_limits.h',385'gallivm/lp_bld_logic.c',386'gallivm/lp_bld_logic.h',387'gallivm/lp_bld_misc.cpp',388'gallivm/lp_bld_misc.h',389'gallivm/lp_bld_nir.h',390'gallivm/lp_bld_nir.c',391'gallivm/lp_bld_nir_soa.c',392'gallivm/lp_bld_pack.c',393'gallivm/lp_bld_pack.h',394'gallivm/lp_bld_printf.c',395'gallivm/lp_bld_printf.h',396'gallivm/lp_bld_quad.c',397'gallivm/lp_bld_quad.h',398'gallivm/lp_bld_sample_aos.c',399'gallivm/lp_bld_sample_aos.h',400'gallivm/lp_bld_sample.c',401'gallivm/lp_bld_sample.h',402'gallivm/lp_bld_sample_soa.c',403'gallivm/lp_bld_struct.c',404'gallivm/lp_bld_struct.h',405'gallivm/lp_bld_swizzle.c',406'gallivm/lp_bld_swizzle.h',407'gallivm/lp_bld_tgsi_action.c',408'gallivm/lp_bld_tgsi_action.h',409'gallivm/lp_bld_tgsi_aos.c',410'gallivm/lp_bld_tgsi.c',411'gallivm/lp_bld_tgsi.h',412'gallivm/lp_bld_tgsi_info.c',413'gallivm/lp_bld_tgsi_soa.c',414'gallivm/lp_bld_type.c',415'gallivm/lp_bld_type.h',416'draw/draw_llvm.c',417'draw/draw_llvm.h',418'draw/draw_llvm_sample.c',419'draw/draw_pt_fetch_shade_pipeline_llvm.c',420'draw/draw_vs_llvm.c',421'tessellator/tessellator.cpp',422'tessellator/tessellator.hpp',423'tessellator/p_tessellator.cpp',424'tessellator/p_tessellator.h',425'nir/nir_to_tgsi_info.c',426'nir/nir_to_tgsi_info.h',427)428endif429430files_libgalliumvl = files(431'vl/vl_bicubic_filter.c',432'vl/vl_bicubic_filter.h',433'vl/vl_compositor.c',434'vl/vl_compositor.h',435'vl/vl_compositor_gfx.c',436'vl/vl_compositor_gfx.h',437'vl/vl_compositor_cs.c',438'vl/vl_compositor_cs.h',439'vl/vl_csc.c',440'vl/vl_csc.h',441'vl/vl_decoder.c',442'vl/vl_decoder.h',443'vl/vl_defines.h',444'vl/vl_deint_filter.c',445'vl/vl_deint_filter.h',446'vl/vl_idct.c',447'vl/vl_idct.h',448'vl/vl_matrix_filter.c',449'vl/vl_matrix_filter.h',450'vl/vl_mc.c',451'vl/vl_mc.h',452'vl/vl_median_filter.c',453'vl/vl_median_filter.h',454'vl/vl_mpeg12_bitstream.c',455'vl/vl_mpeg12_bitstream.h',456'vl/vl_mpeg12_decoder.c',457'vl/vl_mpeg12_decoder.h',458'vl/vl_rbsp.h',459'vl/vl_types.h',460'vl/vl_vertex_buffers.c',461'vl/vl_vertex_buffers.h',462'vl/vl_video_buffer.c',463'vl/vl_video_buffer.h',464'vl/vl_vlc.h',465'vl/vl_zscan.c',466'vl/vl_zscan.h',467'vl/vl_probs_table.h',468)469470vlwinsys_deps = []471files_libgalliumvlwinsys = files('vl/vl_winsys.h',472'vl/vl_winsys_drm.c')473if with_dri2 and with_platform_x11474files_libgalliumvlwinsys += files('vl/vl_winsys_dri.c')475if with_dri3476vlwinsys_deps += [477dep_xcb_sync, dep_xcb_present, dep_xshmfence, dep_xcb_xfixes,478dep_xcb_dri3,479]480files_libgalliumvlwinsys += files('vl/vl_winsys_dri3.c')481endif482endif483484u_trace_py = files('util/u_trace.py')485486files_libgallium += custom_target(487'u_tracepoints.c',488input: 'util/u_tracepoints.py',489output: 'u_tracepoints.c',490command: [491prog_python, '@INPUT@',492'-p', join_paths(meson.source_root(), 'src/gallium/auxiliary/util/'),493'-C', '@OUTPUT@',494],495depend_files: u_trace_py,496)497498files_u_tracepoints = custom_target(499'u_tracepoints.h',500input: 'util/u_tracepoints.py',501output: 'u_tracepoints.h',502command: [503prog_python, '@INPUT@',504'-p', join_paths(meson.source_root(), 'src/gallium/auxiliary/util/'),505'-H', '@OUTPUT@',506],507depend_files: u_trace_py,508)509510files_libgallium += files_u_tracepoints511512idep_u_tracepoints = declare_dependency(513sources: files_u_tracepoints,514)515516u_indices_gen_c = custom_target(517'u_indices_gen.c',518input : 'indices/u_indices_gen.py',519output : 'u_indices_gen.c',520command : [prog_python, '@INPUT@'],521capture : true,522)523524u_unfilled_gen_c = custom_target(525'u_unfilled_gen.c',526input : 'indices/u_unfilled_gen.py',527output : 'u_unfilled_gen.c',528command : [prog_python, '@INPUT@'],529capture : true,530)531532libgallium_extra_c_args = []533if with_swrast_vk and with_gallium_zink534libgallium_extra_c_args += '-DZINK_WITH_SWRAST_VK'535endif536libgallium = static_library(537'gallium',538[files_libgallium, u_indices_gen_c, u_unfilled_gen_c],539include_directories : [540inc_loader, inc_gallium, inc_src, inc_include, include_directories('util')541],542c_args : [c_msvc_compat_args, libgallium_extra_c_args],543cpp_args : [cpp_msvc_compat_args],544gnu_symbol_visibility : 'hidden',545dependencies : [546dep_libdrm, dep_llvm, dep_dl, dep_m, dep_thread, dep_lmsensors, dep_ws2_32,547idep_nir, idep_nir_headers, idep_mesautil,548],549build_by_default : false550)551552libgalliumvl_stub = static_library(553'galliumvl_stub',554'vl/vl_stubs.c',555c_args : [c_msvc_compat_args],556cpp_args : [cpp_msvc_compat_args],557gnu_symbol_visibility : 'hidden',558include_directories: [inc_gallium, inc_include, inc_src],559dependencies : idep_mesautil,560build_by_default : false,561)562563libgalliumvl = static_library(564'galliumvl',565files_libgalliumvl,566c_args : [c_msvc_compat_args],567cpp_args : [cpp_msvc_compat_args],568gnu_symbol_visibility : 'hidden',569include_directories : [inc_gallium, inc_include, inc_src],570dependencies : idep_mesautil,571build_by_default : false,572)573574# XXX: The dependencies here may be off...575libgalliumvlwinsys = static_library(576'galliumvlwinsys',577files_libgalliumvlwinsys,578include_directories : [inc_gallium, inc_include, inc_loader, inc_src],579dependencies : [dep_libdrm, vlwinsys_deps, idep_mesautil],580build_by_default : false,581)582583584