101e04c3fSmrg# Copyright © 2017 Intel Corporation 201e04c3fSmrg 301e04c3fSmrg# Permission is hereby granted, free of charge, to any person obtaining a copy 401e04c3fSmrg# of this software and associated documentation files (the "Software"), to deal 501e04c3fSmrg# in the Software without restriction, including without limitation the rights 601e04c3fSmrg# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 701e04c3fSmrg# copies of the Software, and to permit persons to whom the Software is 801e04c3fSmrg# furnished to do so, subject to the following conditions: 901e04c3fSmrg 1001e04c3fSmrg# The above copyright notice and this permission notice shall be included in 1101e04c3fSmrg# all copies or substantial portions of the Software. 1201e04c3fSmrg 1301e04c3fSmrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1401e04c3fSmrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1501e04c3fSmrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1601e04c3fSmrg# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1701e04c3fSmrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1801e04c3fSmrg# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 1901e04c3fSmrg# SOFTWARE. 2001e04c3fSmrg 217ec681f3Smrgisl_per_hw_ver_files = files( 2201e04c3fSmrg 'isl_emit_depth_stencil.c', 2301e04c3fSmrg 'isl_surface_state.c', 2401e04c3fSmrg) 2501e04c3fSmrg 267ec681f3Smrgisl_gfx4_files = files( 277ec681f3Smrg 'isl_gfx4.c', 287ec681f3Smrg 'isl_gfx4.h', 2901e04c3fSmrg) 3001e04c3fSmrg 317ec681f3Smrgisl_gfx6_files = files( 327ec681f3Smrg 'isl_gfx6.c', 337ec681f3Smrg 'isl_gfx6.h', 3401e04c3fSmrg) 3501e04c3fSmrg 367ec681f3Smrgisl_gfx7_files = files( 377ec681f3Smrg 'isl_gfx7.c', 387ec681f3Smrg 'isl_gfx7.h', 3901e04c3fSmrg) 4001e04c3fSmrg 417ec681f3Smrgisl_gfx8_files = files( 427ec681f3Smrg 'isl_gfx8.c', 437ec681f3Smrg 'isl_gfx8.h', 4401e04c3fSmrg) 4501e04c3fSmrg 467ec681f3Smrgisl_gfx9_files = files( 477ec681f3Smrg 'isl_gfx9.c', 487ec681f3Smrg 'isl_gfx9.h', 4901e04c3fSmrg) 5001e04c3fSmrg 517ec681f3Smrgisl_gfx12_files = files( 527ec681f3Smrg 'isl_gfx12.c', 537ec681f3Smrg 'isl_gfx12.h', 547ec681f3Smrg) 557ec681f3Smrg 567ec681f3Smrgisl_gfx125_files = files( 577ec681f3Smrg 'isl_gfx12.c', 587ec681f3Smrg 'isl_gfx12.h', 597ec681f3Smrg) 607ec681f3Smrg 617ec681f3Smrgisl_per_hw_ver_libs = [] 627ec681f3Smrgforeach g : [['40', isl_gfx4_files], ['50', []], ['60', isl_gfx6_files], 637ec681f3Smrg ['70', isl_gfx7_files], ['75', []], ['80', isl_gfx8_files], 647ec681f3Smrg ['90', isl_gfx9_files], ['110', []], ['120', isl_gfx12_files], 657ec681f3Smrg ['125', isl_gfx12_files]] 667ec681f3Smrg _gfx_ver = g[0] 677ec681f3Smrg isl_per_hw_ver_libs += static_library( 687ec681f3Smrg 'isl_per_hw_ver@0@'.format(_gfx_ver), 697ec681f3Smrg [g[1], isl_per_hw_ver_files, gen_xml_pack], 707ec681f3Smrg include_directories : [inc_include, inc_src, inc_gallium, inc_intel], 717ec681f3Smrg dependencies : idep_mesautil, 727ec681f3Smrg c_args : [ 737ec681f3Smrg no_override_init_args, 747ec681f3Smrg '-DGFX_VERx10=@0@'.format(_gfx_ver) 757ec681f3Smrg ], 767ec681f3Smrg gnu_symbol_visibility : 'hidden', 7701e04c3fSmrg ) 7801e04c3fSmrgendforeach 7901e04c3fSmrg 8001e04c3fSmrgisl_format_layout_c = custom_target( 8101e04c3fSmrg 'isl_format_layout.c', 8201e04c3fSmrg input : ['gen_format_layout.py', 'isl_format_layout.csv'], 8301e04c3fSmrg output : 'isl_format_layout.c', 8401e04c3fSmrg command : [prog_python, '@INPUT0@', '--csv', '@INPUT1@', '--out', '@OUTPUT@'], 8501e04c3fSmrg) 8601e04c3fSmrg 879f464c52Smayafiles_isl_tiled_memcpy = files( 889f464c52Smaya 'isl_tiled_memcpy_normal.c' 899f464c52Smaya) 909f464c52Smaya 919f464c52Smayafiles_isl_tiled_memcpy_sse41 = files( 929f464c52Smaya 'isl_tiled_memcpy_sse41.c', 939f464c52Smaya) 949f464c52Smaya 959f464c52Smayaisl_tiled_memcpy = static_library( 969f464c52Smaya 'isl_tiled_memcpy', 979f464c52Smaya [files_isl_tiled_memcpy], 989f464c52Smaya include_directories : [ 997ec681f3Smrg inc_include, inc_src, inc_mesa, inc_gallium, inc_intel, 1009f464c52Smaya ], 1017ec681f3Smrg dependencies : idep_mesautil, 1027ec681f3Smrg c_args : [no_override_init_args, '-msse2'], 1037ec681f3Smrg gnu_symbol_visibility : 'hidden', 1049f464c52Smaya extra_files : ['isl_tiled_memcpy.c'] 1059f464c52Smaya) 1069f464c52Smaya 1079f464c52Smayaif with_sse41 1089f464c52Smaya isl_tiled_memcpy_sse41 = static_library( 1099f464c52Smaya 'isl_tiled_memcpy_sse41', 1109f464c52Smaya [files_isl_tiled_memcpy_sse41], 1119f464c52Smaya include_directories : [ 1127ec681f3Smrg inc_include, inc_src, inc_mesa, inc_gallium, inc_intel, 1139f464c52Smaya ], 1147ec681f3Smrg dependencies : idep_mesautil, 1159f464c52Smaya link_args : ['-Wl,--exclude-libs=ALL'], 1167ec681f3Smrg c_args : [no_override_init_args, '-msse2', sse41_args], 1177ec681f3Smrg gnu_symbol_visibility : 'hidden', 1189f464c52Smaya extra_files : ['isl_tiled_memcpy.c'] 1199f464c52Smaya ) 1209f464c52Smayaelse 1219f464c52Smaya isl_tiled_memcpy_sse41 = [] 1229f464c52Smayaendif 1239f464c52Smaya 12401e04c3fSmrglibisl_files = files( 12501e04c3fSmrg 'isl.c', 12601e04c3fSmrg 'isl.h', 1277ec681f3Smrg 'isl_aux_info.c', 12801e04c3fSmrg 'isl_drm.c', 12901e04c3fSmrg 'isl_genX_priv.h', 13001e04c3fSmrg 'isl_format.c', 13101e04c3fSmrg 'isl_priv.h', 13201e04c3fSmrg 'isl_storage_image.c', 13301e04c3fSmrg) 13401e04c3fSmrg 13501e04c3fSmrglibisl = static_library( 13601e04c3fSmrg 'isl', 13701e04c3fSmrg [libisl_files, isl_format_layout_c, genX_bits_h], 1387ec681f3Smrg include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel], 1397ec681f3Smrg link_with : [isl_per_hw_ver_libs, isl_tiled_memcpy, isl_tiled_memcpy_sse41], 1407ec681f3Smrg dependencies : idep_mesautil, 1417ec681f3Smrg c_args : [no_override_init_args], 1427ec681f3Smrg gnu_symbol_visibility : 'hidden', 14301e04c3fSmrg) 14401e04c3fSmrg 14501e04c3fSmrgif with_tests 14601e04c3fSmrg test( 14701e04c3fSmrg 'isl_surf_get_image_offset', 14801e04c3fSmrg executable( 14901e04c3fSmrg 'isl_surf_get_image_offset_test', 15001e04c3fSmrg 'tests/isl_surf_get_image_offset_test.c', 1517ec681f3Smrg dependencies : [dep_m, idep_mesautil], 1527ec681f3Smrg include_directories : [inc_include, inc_src, inc_gallium, inc_intel], 1537ec681f3Smrg link_with : [libisl, libintel_dev], 1547ec681f3Smrg ), 1557ec681f3Smrg suite : ['intel'], 1567ec681f3Smrg ) 1577ec681f3Smrg test( 1587ec681f3Smrg 'isl_aux_info', 1597ec681f3Smrg executable( 1607ec681f3Smrg 'isl_aux_info_test', 1617ec681f3Smrg [ 1627ec681f3Smrg 'tests/isl_aux_info_test.cpp', 1637ec681f3Smrg 'isl_aux_info.c', 1647ec681f3Smrg ], 1657ec681f3Smrg dependencies : [dep_m, idep_gtest, idep_mesautil], 1667ec681f3Smrg include_directories : [inc_include, inc_src, inc_gallium, inc_intel], 1677ec681f3Smrg c_args : '-DIN_UNIT_TEST', 1687ec681f3Smrg cpp_args : '-DIN_UNIT_TEST', 1699f464c52Smaya ), 1709f464c52Smaya suite : ['intel'], 17101e04c3fSmrg ) 17201e04c3fSmrgendif 173