1bf215546Sopenharmony_ci# Copyright © 2017 Dylan Baker 2bf215546Sopenharmony_ci 3bf215546Sopenharmony_ci# Permission is hereby granted, free of charge, to any person obtaining a copy 4bf215546Sopenharmony_ci# of this software and associated documentation files (the "Software"), to deal 5bf215546Sopenharmony_ci# in the Software without restriction, including without limitation the rights 6bf215546Sopenharmony_ci# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7bf215546Sopenharmony_ci# copies of the Software, and to permit persons to whom the Software is 8bf215546Sopenharmony_ci# furnished to do so, subject to the following conditions: 9bf215546Sopenharmony_ci 10bf215546Sopenharmony_ci# The above copyright notice and this permission notice shall be included in 11bf215546Sopenharmony_ci# all copies or substantial portions of the Software. 12bf215546Sopenharmony_ci 13bf215546Sopenharmony_ci# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14bf215546Sopenharmony_ci# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15bf215546Sopenharmony_ci# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16bf215546Sopenharmony_ci# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17bf215546Sopenharmony_ci# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18bf215546Sopenharmony_ci# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19bf215546Sopenharmony_ci# SOFTWARE. 20bf215546Sopenharmony_ci 21bf215546Sopenharmony_cifiles_libradeonsi = files( 22bf215546Sopenharmony_ci 'driinfo_radeonsi.h', 23bf215546Sopenharmony_ci 'gfx10_query.c', 24bf215546Sopenharmony_ci 'gfx10_shader_ngg.c', 25bf215546Sopenharmony_ci 'si_blit.c', 26bf215546Sopenharmony_ci 'si_buffer.c', 27bf215546Sopenharmony_ci 'si_build_pm4.h', 28bf215546Sopenharmony_ci 'si_clear.c', 29bf215546Sopenharmony_ci 'si_compute.c', 30bf215546Sopenharmony_ci 'si_compute.h', 31bf215546Sopenharmony_ci 'si_compute_blit.c', 32bf215546Sopenharmony_ci 'si_cp_dma.c', 33bf215546Sopenharmony_ci 'si_cp_reg_shadowing.c', 34bf215546Sopenharmony_ci 'si_debug.c', 35bf215546Sopenharmony_ci 'si_descriptors.c', 36bf215546Sopenharmony_ci 'si_fence.c', 37bf215546Sopenharmony_ci 'si_get.c', 38bf215546Sopenharmony_ci 'si_gfx_cs.c', 39bf215546Sopenharmony_ci 'si_gpu_load.c', 40bf215546Sopenharmony_ci 'si_perfcounter.c', 41bf215546Sopenharmony_ci 'si_pipe.c', 42bf215546Sopenharmony_ci 'si_pipe.h', 43bf215546Sopenharmony_ci 'si_pm4.c', 44bf215546Sopenharmony_ci 'si_pm4.h', 45bf215546Sopenharmony_ci 'si_public.h', 46bf215546Sopenharmony_ci 'si_query.c', 47bf215546Sopenharmony_ci 'si_query.h', 48bf215546Sopenharmony_ci 'si_nir_optim.c', 49bf215546Sopenharmony_ci 'si_sdma_copy_image.c', 50bf215546Sopenharmony_ci 'si_shader.c', 51bf215546Sopenharmony_ci 'si_shader.h', 52bf215546Sopenharmony_ci 'si_shader_info.c', 53bf215546Sopenharmony_ci 'si_shader_internal.h', 54bf215546Sopenharmony_ci 'si_shader_llvm.c', 55bf215546Sopenharmony_ci 'si_shader_llvm_gs.c', 56bf215546Sopenharmony_ci 'si_shader_llvm_ps.c', 57bf215546Sopenharmony_ci 'si_shader_llvm_resources.c', 58bf215546Sopenharmony_ci 'si_shader_llvm_tess.c', 59bf215546Sopenharmony_ci 'si_shader_llvm_vs.c', 60bf215546Sopenharmony_ci 'si_shader_nir.c', 61bf215546Sopenharmony_ci 'si_shaderlib_nir.c', 62bf215546Sopenharmony_ci 'si_shaderlib_tgsi.c', 63bf215546Sopenharmony_ci 'si_sqtt.c', 64bf215546Sopenharmony_ci 'si_state.c', 65bf215546Sopenharmony_ci 'si_state.h', 66bf215546Sopenharmony_ci 'si_state_binning.c', 67bf215546Sopenharmony_ci 'si_state_msaa.c', 68bf215546Sopenharmony_ci 'si_state_shaders.cpp', 69bf215546Sopenharmony_ci 'si_state_streamout.c', 70bf215546Sopenharmony_ci 'si_state_viewport.c', 71bf215546Sopenharmony_ci 'si_test_image_copy_region.c', 72bf215546Sopenharmony_ci 'si_test_dma_perf.c', 73bf215546Sopenharmony_ci 'si_texture.c', 74bf215546Sopenharmony_ci 'si_uvd.c', 75bf215546Sopenharmony_ci 'pspdecryptionparam.h', 76bf215546Sopenharmony_ci 'radeon_temporal.h', 77bf215546Sopenharmony_ci 'radeon_uvd.c', 78bf215546Sopenharmony_ci 'radeon_uvd.h', 79bf215546Sopenharmony_ci 'radeon_uvd_enc.c', 80bf215546Sopenharmony_ci 'radeon_uvd_enc.h', 81bf215546Sopenharmony_ci 'radeon_uvd_enc_1_1.c', 82bf215546Sopenharmony_ci 'radeon_vce.c', 83bf215546Sopenharmony_ci 'radeon_vce.h', 84bf215546Sopenharmony_ci 'radeon_vce_40_2_2.c', 85bf215546Sopenharmony_ci 'radeon_vce_50.c', 86bf215546Sopenharmony_ci 'radeon_vce_52.c', 87bf215546Sopenharmony_ci 'radeon_vcn.h', 88bf215546Sopenharmony_ci 'radeon_vcn.c', 89bf215546Sopenharmony_ci 'radeon_vcn_av1_default.h', 90bf215546Sopenharmony_ci 'radeon_vcn_dec.c', 91bf215546Sopenharmony_ci 'radeon_vcn_dec.h', 92bf215546Sopenharmony_ci 'radeon_vcn_dec_jpeg.c', 93bf215546Sopenharmony_ci 'radeon_vcn_enc.c', 94bf215546Sopenharmony_ci 'radeon_vcn_enc.h', 95bf215546Sopenharmony_ci 'radeon_vcn_enc_1_2.c', 96bf215546Sopenharmony_ci 'radeon_vcn_enc_2_0.c', 97bf215546Sopenharmony_ci 'radeon_vcn_enc_3_0.c', 98bf215546Sopenharmony_ci 'radeon_vcn_enc_4_0.c', 99bf215546Sopenharmony_ci 'radeon_video.c', 100bf215546Sopenharmony_ci 'radeon_video.h', 101bf215546Sopenharmony_ci) 102bf215546Sopenharmony_ci 103bf215546Sopenharmony_ciradeonsi_include_dirs = [inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_amd_common, 104bf215546Sopenharmony_ci inc_amd_common_llvm, inc_gallium_drivers] 105bf215546Sopenharmony_ciradeonsi_deps = [dep_llvm, dep_clock, dep_libdrm_radeon, idep_nir_headers, idep_amdgfxregs_h, idep_mesautil] 106bf215546Sopenharmony_ci 107bf215546Sopenharmony_ciradeonsi_gfx_libs = [] 108bf215546Sopenharmony_ciforeach ver : ['6', '7', '8', '9', '10', '103', '11'] 109bf215546Sopenharmony_ci radeonsi_gfx_libs += static_library( 110bf215546Sopenharmony_ci 'radeonsi_gfx@0@'.format(ver), 111bf215546Sopenharmony_ci ['si_state_draw.cpp'], 112bf215546Sopenharmony_ci include_directories : radeonsi_include_dirs, 113bf215546Sopenharmony_ci cpp_args : ['-DGFX_VER=@0@'.format(ver)], 114bf215546Sopenharmony_ci gnu_symbol_visibility : 'hidden', 115bf215546Sopenharmony_ci dependencies : radeonsi_deps, 116bf215546Sopenharmony_ci ) 117bf215546Sopenharmony_ciendforeach 118bf215546Sopenharmony_ci 119bf215546Sopenharmony_cilibradeonsi = static_library( 120bf215546Sopenharmony_ci 'radeonsi', 121bf215546Sopenharmony_ci [files_libradeonsi, sid_tables_h], 122bf215546Sopenharmony_ci include_directories : radeonsi_include_dirs, 123bf215546Sopenharmony_ci gnu_symbol_visibility : 'hidden', 124bf215546Sopenharmony_ci dependencies : radeonsi_deps, 125bf215546Sopenharmony_ci) 126bf215546Sopenharmony_ci 127bf215546Sopenharmony_cidriver_radeonsi = declare_dependency( 128bf215546Sopenharmony_ci compile_args : '-DGALLIUM_RADEONSI', 129bf215546Sopenharmony_ci link_with : radeonsi_gfx_libs + [ 130bf215546Sopenharmony_ci libradeonsi, libradeonwinsys, libamdgpuwinsys, libamd_common, libamd_common_llvm, libgalliumvl 131bf215546Sopenharmony_ci ], 132bf215546Sopenharmony_ci dependencies : idep_nir, 133bf215546Sopenharmony_ci) 134