1# Copyright © 2017 Intel Corporation 2# Copyright © 2018 Alyssa Rosenzweig 3 4# Permission is hereby granted, free of charge, to any person obtaining a copy 5# of this software and associated documentation files (the "Software"), to deal 6# in the Software without restriction, including without limitation the rights 7# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8# copies of the Software, and to permit persons to whom the Software is 9# furnished to do so, subject to the following conditions: 10 11# The above copyright notice and this permission notice shall be included in 12# all copies or substantial portions of the Software. 13 14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20# SOFTWARE. 21 22files_panfrost = files( 23 'pan_afbc_cso.c', 24 'pan_bo.c', 25 'pan_device.c', 26 'pan_disk_cache.c', 27 'pan_fence.c', 28 'pan_helpers.c', 29 'pan_public.h', 30 'pan_screen.c', 31 'pan_screen.h', 32 'pan_resource.c', 33 'pan_resource.h', 34 'pan_context.c', 35 'pan_blit.c', 36 'pan_job.c', 37 'pan_shader.c', 38 'pan_mempool.c', 39 'pan_mempool.h', 40 'pan_nir_remove_fragcolor_stores.c', 41 'pan_nir_lower_sysvals.c', 42) 43 44panfrost_includes = [ 45 inc_mapi, 46 inc_mesa, 47 inc_gallium, 48 inc_gallium_aux, 49 inc_include, 50 inc_src, 51 inc_panfrost, 52] 53 54compile_args_panfrost = [ 55 '-DGALLIUM_PANFROST', 56 '-Wno-pointer-arith' 57] 58 59panfrost_versions = ['4', '5', '6', '7', '9'] 60libpanfrost_versions = [] 61 62foreach ver : panfrost_versions 63 files_panfrost_vx = ['pan_cmdstream.c', pan_packers] 64 if ver in ['4', '5', '6', '7', '9'] 65 files_panfrost_vx += ['pan_jm.c'] 66 endif 67 libpanfrost_versions += static_library( 68 'panfrost-v' + ver, files_panfrost_vx, 69 include_directories : panfrost_includes, 70 c_args : ['-DPAN_ARCH=' + ver], 71 gnu_symbol_visibility : 'hidden', 72 dependencies : [idep_pan_packers, idep_nir, dep_libdrm], 73) 74endforeach 75 76libpanfrost = static_library( 77 'panfrost', 78 files_panfrost, 79 dependencies: [ 80 dep_thread, 81 dep_libdrm, 82 idep_mesautil, 83 idep_nir, 84 idep_pan_packers 85 ], 86 include_directories : panfrost_includes, 87 c_args : [c_msvc_compat_args, compile_args_panfrost], 88 gnu_symbol_visibility : 'hidden', 89 link_with: [libpanfrost_versions], 90) 91 92driver_panfrost = declare_dependency( 93 compile_args : compile_args_panfrost, 94 link_with : [libpanfrost, libpanfrostwinsys, libpanfrost_shared, libpanfrost_midgard, libpanfrost_bifrost, libpanfrost_decode, libpanfrost_lib], 95) 96