1# Copyright © 2017 Broadcom 2# SPDX-License-Identifier: MIT 3 4files_libvc4 = files( 5 'kernel/vc4_drv.h', 6 'kernel/vc4_gem.c', 7 'kernel/vc4_packet.h', 8 'kernel/vc4_render_cl.c', 9 'kernel/vc4_validate.c', 10 'kernel/vc4_validate_shaders.c', 11 'vc4_blit.c', 12 'vc4_bufmgr.c', 13 'vc4_bufmgr.h', 14 'vc4_cl.c', 15 'vc4_cl_dump.c', 16 'vc4_cl_dump.h', 17 'vc4_cl.h', 18 'vc4_context.c', 19 'vc4_context.h', 20 'vc4_draw.c', 21 'vc4_emit.c', 22 'vc4_fence.c', 23 'vc4_formats.c', 24 'vc4_job.c', 25 'vc4_nir_lower_blend.c', 26 'vc4_nir_lower_io.c', 27 'vc4_nir_lower_txf_ms.c', 28 'vc4_opt_algebraic.c', 29 'vc4_opt_constant_folding.c', 30 'vc4_opt_copy_propagation.c', 31 'vc4_opt_dead_code.c', 32 'vc4_opt_peephole_sf.c', 33 'vc4_opt_small_immediates.c', 34 'vc4_opt_vpm.c', 35 'vc4_opt_coalesce_ff_writes.c', 36 'vc4_program.c', 37 'vc4_qir.c', 38 'vc4_qir_emit_uniform_stream_resets.c', 39 'vc4_qir_live_variables.c', 40 'vc4_qir_lower_uniforms.c', 41 'vc4_qir_schedule.c', 42 'vc4_qir_validate.c', 43 'vc4_qir.h', 44 'vc4_qpu.c', 45 'vc4_qpu_defines.h', 46 'vc4_qpu_disasm.c', 47 'vc4_qpu_emit.c', 48 'vc4_qpu.h', 49 'vc4_qpu_schedule.c', 50 'vc4_qpu_validate.c', 51 'vc4_query.c', 52 'vc4_register_allocate.c', 53 'vc4_reorder_uniforms.c', 54 'vc4_resource.c', 55 'vc4_resource.h', 56 'vc4_screen.c', 57 'vc4_screen.h', 58 'vc4_simulator.c', 59 'vc4_simulator_validate.h', 60 'vc4_state.c', 61 'vc4_tiling.c', 62 'vc4_tiling_lt.c', 63 'vc4_tiling.h', 64 'vc4_uniforms.c', 65) 66 67vc4_c_args = [] 68 69vc4_deps = [ 70 dep_simpenrose, dep_libdrm, dep_valgrind, 71 idep_nir_headers, idep_mesautil, 72] 73 74libvc4_neon = [] 75if host_machine.cpu_family() == 'arm' 76 libvc4_neon = static_library( 77 'vc4_neon', 78 'vc4_tiling_lt.c', 79 include_directories : [ 80 inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom 81 ], 82 c_args : ['-mfpu=neon', '-DV3D_BUILD_NEON'], 83 dependencies : vc4_deps, 84 ) 85 vc4_c_args += '-DUSE_ARM_ASM' 86endif 87 88if dep_simpenrose.found() 89 vc4_c_args += '-DUSE_VC4_SIMULATOR' 90endif 91 92libvc4 = static_library( 93 'vc4', 94 [files_libvc4, v3d_xml_pack], 95 include_directories : [ 96 inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom, 97 inc_gallium_drivers, 98 ], 99 link_with: libvc4_neon, 100 c_args : [vc4_c_args], 101 gnu_symbol_visibility : 'hidden', 102 dependencies : vc4_deps, 103 build_by_default : false, 104) 105 106driver_vc4 = declare_dependency( 107 compile_args : '-DGALLIUM_VC4', 108 link_with : [libvc4, libvc4winsys, libbroadcom_cle, libbroadcom_v3d], 109 dependencies : idep_nir, 110) 111