Eric Anholt | 1ae8018 | 2017-10-12 13:53:12 -0700 | [diff] [blame] | 1 | # Copyright © 2017 Broadcom |
| 2 | # |
| 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: |
| 9 | # |
| 10 | # The above copyright notice and this permission notice shall be included in |
| 11 | # all copies or substantial portions of the Software. |
| 12 | # |
| 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 |
| 19 | # SOFTWARE. |
| 20 | |
| 21 | files_libvc4 = files( |
| 22 | 'kernel/vc4_drv.h', |
| 23 | 'kernel/vc4_gem.c', |
| 24 | 'kernel/vc4_packet.h', |
| 25 | 'kernel/vc4_render_cl.c', |
| 26 | 'kernel/vc4_validate.c', |
| 27 | 'kernel/vc4_validate_shaders.c', |
| 28 | 'vc4_blit.c', |
| 29 | 'vc4_bufmgr.c', |
| 30 | 'vc4_bufmgr.h', |
| 31 | 'vc4_cl.c', |
| 32 | 'vc4_cl_dump.c', |
| 33 | 'vc4_cl_dump.h', |
| 34 | 'vc4_cl.h', |
| 35 | 'vc4_context.c', |
| 36 | 'vc4_context.h', |
| 37 | 'vc4_draw.c', |
| 38 | 'vc4_emit.c', |
| 39 | 'vc4_fence.c', |
| 40 | 'vc4_formats.c', |
| 41 | 'vc4_job.c', |
| 42 | 'vc4_nir_lower_blend.c', |
| 43 | 'vc4_nir_lower_io.c', |
| 44 | 'vc4_nir_lower_txf_ms.c', |
| 45 | 'vc4_opt_algebraic.c', |
| 46 | 'vc4_opt_constant_folding.c', |
| 47 | 'vc4_opt_copy_propagation.c', |
| 48 | 'vc4_opt_dead_code.c', |
| 49 | 'vc4_opt_peephole_sf.c', |
| 50 | 'vc4_opt_small_immediates.c', |
| 51 | 'vc4_opt_vpm.c', |
| 52 | 'vc4_opt_coalesce_ff_writes.c', |
| 53 | 'vc4_program.c', |
| 54 | 'vc4_qir.c', |
| 55 | 'vc4_qir_emit_uniform_stream_resets.c', |
| 56 | 'vc4_qir_live_variables.c', |
| 57 | 'vc4_qir_lower_uniforms.c', |
| 58 | 'vc4_qir_schedule.c', |
| 59 | 'vc4_qir_validate.c', |
| 60 | 'vc4_qir.h', |
| 61 | 'vc4_qpu.c', |
| 62 | 'vc4_qpu_defines.h', |
| 63 | 'vc4_qpu_disasm.c', |
| 64 | 'vc4_qpu_emit.c', |
| 65 | 'vc4_qpu.h', |
| 66 | 'vc4_qpu_schedule.c', |
| 67 | 'vc4_qpu_validate.c', |
| 68 | 'vc4_query.c', |
| 69 | 'vc4_register_allocate.c', |
| 70 | 'vc4_reorder_uniforms.c', |
| 71 | 'vc4_resource.c', |
| 72 | 'vc4_resource.h', |
| 73 | 'vc4_screen.c', |
| 74 | 'vc4_screen.h', |
| 75 | 'vc4_simulator.c', |
| 76 | 'vc4_simulator_validate.h', |
| 77 | 'vc4_state.c', |
| 78 | 'vc4_tiling.c', |
| 79 | 'vc4_tiling_lt.c', |
| 80 | 'vc4_tiling.h', |
| 81 | 'vc4_uniforms.c', |
| 82 | ) |
| 83 | |
Eric Anholt | ebcb4c2 | 2017-11-08 14:07:38 -0800 | [diff] [blame^] | 84 | libvc4_neon = [] |
| 85 | if with_asm_arch == 'arm' |
| 86 | libvc4_neon = static_library( |
| 87 | 'vc4_neon', |
| 88 | 'vc4_tiling_lt_neon.c', |
| 89 | include_directories : [ |
| 90 | inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom |
| 91 | ], |
| 92 | c_args : '-mfpu=neon', |
| 93 | ) |
| 94 | endif |
| 95 | |
Eric Anholt | 1ae8018 | 2017-10-12 13:53:12 -0700 | [diff] [blame] | 96 | simpenrose_c_args = [] |
| 97 | dep_simpenrose = dependency('simpenrose', required : false) |
| 98 | if dep_simpenrose.found() |
| 99 | simpenrose_c_args = '-DUSE_VC4_SIMULATOR' |
| 100 | endif |
| 101 | |
| 102 | libvc4 = static_library( |
| 103 | 'vc4', |
| 104 | [files_libvc4, v3d_xml_pack, nir_opcodes_h, nir_builder_opcodes_h], |
| 105 | include_directories : [ |
| 106 | inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom, |
| 107 | inc_gallium_drivers, inc_drm_uapi, |
| 108 | ], |
Eric Anholt | ebcb4c2 | 2017-11-08 14:07:38 -0800 | [diff] [blame^] | 109 | link_with: libvc4_neon, |
Eric Anholt | 1ae8018 | 2017-10-12 13:53:12 -0700 | [diff] [blame] | 110 | c_args : [c_vis_args, simpenrose_c_args], |
| 111 | cpp_args : [cpp_vis_args], |
| 112 | dependencies : [dep_simpenrose, dep_libdrm, dep_valgrind], |
| 113 | build_by_default : false, |
| 114 | ) |