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