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 21fs = import('fs') 22 23files_libintel_common = files( 24 'i915/intel_engine.c', 25 'i915/intel_engine.h', 26 'i915/intel_gem.c', 27 'i915/intel_gem.h', 28 'xe/intel_device_query.c', 29 'xe/intel_device_query.h', 30 'xe/intel_engine.c', 31 'xe/intel_engine.h', 32 'xe/intel_gem.c', 33 'xe/intel_gem.h', 34 'intel_aux_map.c', 35 'intel_aux_map.h', 36 'intel_bind_timeline.c', 37 'intel_bind_timeline.h', 38 'intel_buffer_alloc.h', 39 'intel_engine.c', 40 'intel_engine.h', 41 'intel_gem.c', 42 'intel_gem.h', 43 'intel_genX_state_brw.h', 44 'intel_genX_state_elk.h', 45 'intel_guardband.h', 46 'intel_l3_config.c', 47 'intel_l3_config.h', 48 'intel_tiled_render.h', 49 'intel_urb_config.c', 50 'intel_sample_positions.c', 51 'intel_sample_positions.h', 52 'intel_uuid.c', 53 'intel_uuid.h', 54 'intel_measure.c', 55 'intel_measure.h', 56 'intel_mem.c', 57 'intel_mem.h', 58 'intel_pixel_hash.h' 59) 60 61libintel_common_links = [libisl] 62 63if with_clflushopt 64 libintel_clflushopt = static_library( 65 'intel_clflushopt', 66 ['intel_clflushopt.c'], 67 include_directories : [inc_include, inc_src], 68 c_args : [no_override_init_args] + clflushopt_args, 69 gnu_symbol_visibility : 'hidden', 70 ) 71 libintel_common_links += libintel_clflushopt 72endif 73 74libintel_common = static_library( 75 'intel_common', 76 [files_libintel_common, genX_xml_h, sha1_h], 77 include_directories : [inc_include, inc_src, inc_intel], 78 c_args : [no_override_init_args, sse2_args], 79 gnu_symbol_visibility : 'hidden', 80 link_with : libintel_common_links, 81 dependencies : [dep_libdrm, dep_thread, idep_genxml, idep_mesautil, idep_intel_dev], 82) 83 84libintel_extra_dependencies = [] 85if with_platform_android 86 libintel_extra_dependencies += dep_android 87endif 88 89idep_libintel_common = declare_dependency( 90 link_with: [libintel_common], 91 dependencies: [libintel_extra_dependencies], 92) 93 94install_intel_gpu_tests = get_option('install-intel-gpu-tests') 95if install_intel_gpu_tests and not with_tests 96 error('`install-intel-gpu-tests` requires `build-tests`') 97endif 98 99if with_tests and not with_platform_android 100 foreach g : [['70', 'gfx7'], ['75', 'hsw'], ['80', 'gfx8'], 101 ['90', 'gfx9'], ['110', 'gfx11'], ['120', 'gfx12'], 102 ['125', 'gfx125']] 103 executable( 104 'intel_@0@_mi_builder_test'.format(g[1]), 105 files('tests/mi_builder_test.cpp'), 106 cpp_args : [ 107 cpp_msvc_compat_args, 108 '-DGFX_VERx10=@0@'.format(g[0]) 109 ], 110 gnu_symbol_visibility : 'hidden', 111 include_directories : [inc_include, inc_src, inc_intel], 112 link_with : [libintel_common], 113 dependencies : [dep_libdrm, idep_gtest, idep_genxml, idep_mesautil, idep_intel_dev], 114 install : install_intel_gpu_tests, 115 ) 116 endforeach 117endif 118