1# Copyright © 2017 Intel Corporation 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 21isl_per_hw_ver_files = files( 22 'isl_emit_depth_stencil.c', 23 'isl_surface_state.c', 24) 25 26isl_gfx4_files = files( 27 'isl_gfx4.c', 28 'isl_gfx4.h', 29) 30 31isl_gfx6_files = files( 32 'isl_gfx6.c', 33 'isl_gfx6.h', 34) 35 36isl_gfx7_files = files( 37 'isl_gfx7.c', 38 'isl_gfx7.h', 39) 40 41isl_gfx8_files = files( 42 'isl_gfx8.c', 43 'isl_gfx8.h', 44) 45 46isl_gfx9_files = files( 47 'isl_gfx9.c', 48 'isl_gfx9.h', 49) 50 51isl_gfx12_files = files( 52 'isl_gfx12.c', 53 'isl_gfx12.h', 54) 55 56isl_gfx125_files = files( 57 'isl_gfx12.c', 58 'isl_gfx12.h', 59) 60 61isl_per_hw_ver_libs = [] 62foreach g : [['40', isl_gfx4_files], ['50', []], ['60', isl_gfx6_files], 63 ['70', isl_gfx7_files], ['75', []], ['80', isl_gfx8_files], 64 ['90', isl_gfx9_files], ['110', []], ['120', isl_gfx12_files], 65 ['125', isl_gfx12_files]] 66 _gfx_ver = g[0] 67 isl_per_hw_ver_libs += static_library( 68 'isl_per_hw_ver@0@'.format(_gfx_ver), 69 [g[1], isl_per_hw_ver_files, gen_xml_pack], 70 include_directories : [inc_include, inc_src, inc_gallium, inc_intel], 71 dependencies : idep_mesautil, 72 c_args : [ 73 no_override_init_args, 74 '-DGFX_VERx10=@0@'.format(_gfx_ver) 75 ], 76 gnu_symbol_visibility : 'hidden', 77 ) 78endforeach 79 80isl_format_layout_c = custom_target( 81 'isl_format_layout.c', 82 input : ['gen_format_layout.py', 'isl_format_layout.csv'], 83 output : 'isl_format_layout.c', 84 command : [prog_python, '@INPUT0@', '--csv', '@INPUT1@', '--out', '@OUTPUT@'], 85) 86 87files_isl_tiled_memcpy = files( 88 'isl_tiled_memcpy_normal.c' 89) 90 91files_isl_tiled_memcpy_sse41 = files( 92 'isl_tiled_memcpy_sse41.c', 93) 94 95isl_tiled_memcpy = static_library( 96 'isl_tiled_memcpy', 97 [files_isl_tiled_memcpy], 98 include_directories : [ 99 inc_include, inc_src, inc_mesa, inc_gallium, inc_intel, 100 ], 101 dependencies : idep_mesautil, 102 c_args : [no_override_init_args, '-msse2'], 103 gnu_symbol_visibility : 'hidden', 104 extra_files : ['isl_tiled_memcpy.c'] 105) 106 107if with_sse41 108 isl_tiled_memcpy_sse41 = static_library( 109 'isl_tiled_memcpy_sse41', 110 [files_isl_tiled_memcpy_sse41], 111 include_directories : [ 112 inc_include, inc_src, inc_mesa, inc_gallium, inc_intel, 113 ], 114 dependencies : idep_mesautil, 115 link_args : ['-Wl,--exclude-libs=ALL'], 116 c_args : [no_override_init_args, '-msse2', sse41_args], 117 gnu_symbol_visibility : 'hidden', 118 extra_files : ['isl_tiled_memcpy.c'] 119 ) 120else 121 isl_tiled_memcpy_sse41 = [] 122endif 123 124libisl_files = files( 125 'isl.c', 126 'isl.h', 127 'isl_aux_info.c', 128 'isl_drm.c', 129 'isl_genX_priv.h', 130 'isl_format.c', 131 'isl_priv.h', 132 'isl_storage_image.c', 133) 134 135libisl = static_library( 136 'isl', 137 [libisl_files, isl_format_layout_c, genX_bits_h], 138 include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel], 139 link_with : [isl_per_hw_ver_libs, isl_tiled_memcpy, isl_tiled_memcpy_sse41], 140 dependencies : idep_mesautil, 141 c_args : [no_override_init_args], 142 gnu_symbol_visibility : 'hidden', 143) 144 145if with_tests 146 test( 147 'isl_surf_get_image_offset', 148 executable( 149 'isl_surf_get_image_offset_test', 150 'tests/isl_surf_get_image_offset_test.c', 151 dependencies : [dep_m, idep_mesautil], 152 include_directories : [inc_include, inc_src, inc_gallium, inc_intel], 153 link_with : [libisl, libintel_dev], 154 ), 155 suite : ['intel'], 156 ) 157 test( 158 'isl_aux_info', 159 executable( 160 'isl_aux_info_test', 161 [ 162 'tests/isl_aux_info_test.cpp', 163 'isl_aux_info.c', 164 ], 165 dependencies : [dep_m, idep_gtest, idep_mesautil], 166 include_directories : [inc_include, inc_src, inc_gallium, inc_intel], 167 c_args : '-DIN_UNIT_TEST', 168 cpp_args : '-DIN_UNIT_TEST', 169 ), 170 suite : ['intel'], 171 ) 172endif 173