1# Copyright © 2018 Lima Project 2# SPDX-License-Identifier: MIT 3 4files_lima = files( 5 'ir/gp/gpir.h', 6 'ir/gp/nir.c', 7 'ir/gp/node.c', 8 'ir/gp/lower.c', 9 'ir/gp/scheduler.c', 10 'ir/gp/instr.c', 11 'ir/gp/codegen.h', 12 'ir/gp/codegen.c', 13 'ir/gp/reduce_scheduler.c', 14 'ir/gp/regalloc.c', 15 'ir/gp/disasm.c', 16 'ir/gp/optimize.c', 17 18 'ir/pp/ppir.h', 19 'ir/pp/nir.c', 20 'ir/pp/node.c', 21 'ir/pp/lower.c', 22 'ir/pp/scheduler.c', 23 'ir/pp/instr.c', 24 'ir/pp/regalloc.c', 25 'ir/pp/liveness.c', 26 'ir/pp/codegen.h', 27 'ir/pp/codegen.c', 28 'ir/pp/node_to_instr.c', 29 'ir/pp/disasm.c', 30 31 'ir/lima_nir_duplicate_consts.c', 32 'ir/lima_nir_duplicate_intrinsic.c', 33 'ir/lima_nir_lower_uniform_to_scalar.c', 34 'ir/lima_nir_split_load_input.c', 35 'ir/lima_nir_split_loads.c', 36 'ir/lima_nir_lower_txp.c', 37 38 'ir/lima_ir.h', 39 40 'lima_screen.c', 41 'lima_screen.h', 42 'lima_context.c', 43 'lima_context.h', 44 'lima_resource.c', 45 'lima_resource.h', 46 'lima_state.c', 47 'lima_disk_cache.c', 48 'lima_disk_cache.h', 49 'lima_draw.c', 50 'lima_program.c', 51 'lima_query.c', 52 'lima_bo.c', 53 'lima_bo.h', 54 'lima_job.c', 55 'lima_job.h', 56 'lima_parser.c', 57 'lima_parser.h', 58 'lima_util.c', 59 'lima_util.h', 60 'lima_texture.c', 61 'lima_texture.h', 62 'lima_fence.c', 63 'lima_fence.h', 64 'lima_format.h', 65 'lima_format.c', 66 'lima_gpu.h', 67 'lima_blit.c', 68 'lima_blit.h', 69) 70 71lima_nir_algebraic_c = custom_target( 72 'lima_nir_algebraic.c', 73 input : 'ir/lima_nir_algebraic.py', 74 output : 'lima_nir_algebraic.c', 75 command : [ 76 prog_python, '@INPUT@', '-p', dir_compiler_nir, 77 ], 78 capture : true, 79 depend_files : nir_algebraic_depends, 80) 81 82liblima = static_library( 83 'lima', 84 files_lima, lima_nir_algebraic_c, 85 include_directories : [ 86 inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers, 87 inc_panfrost 88 ], 89 dependencies : [dep_libdrm, idep_nir_headers, idep_mesautil], 90) 91 92driver_lima = declare_dependency( 93 compile_args : '-DGALLIUM_LIMA', 94 link_with : [liblima, liblimawinsys, libpanfrost_shared], 95 dependencies : idep_nir, 96) 97 98lima_disasm = executable( 99 'lima_disasm', 100 files( 101 'standalone/lima_disasm.c', 102 ), 103 include_directories : [ 104 inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers, inc_mesa, inc_mapi, 105 ], 106 dependencies : [ 107 idep_mesautil, 108 ], 109 link_with : [ 110 liblima, 111 libpanfrost_shared, 112 ], 113 build_by_default : with_tools.contains('lima'), 114 install : with_tools.contains('lima'), 115) 116 117if with_tools.contains('drm-shim') 118 subdir('drm-shim') 119endif 120