1bf215546Sopenharmony_ci# Copyright © 2017 Intel Corporation 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_r600 = files( 22bf215546Sopenharmony_ci 'r600d_common.h', 23bf215546Sopenharmony_ci 'compute_memory_pool.c', 24bf215546Sopenharmony_ci 'compute_memory_pool.h', 25bf215546Sopenharmony_ci 'eg_asm.c', 26bf215546Sopenharmony_ci 'eg_debug.c', 27bf215546Sopenharmony_ci 'eg_sq.h', 28bf215546Sopenharmony_ci 'evergreen_compute.c', 29bf215546Sopenharmony_ci 'evergreen_compute.h', 30bf215546Sopenharmony_ci 'evergreen_compute_internal.h', 31bf215546Sopenharmony_ci 'evergreend.h', 32bf215546Sopenharmony_ci 'evergreen_hw_context.c', 33bf215546Sopenharmony_ci 'evergreen_state.c', 34bf215546Sopenharmony_ci 'r600_asm.c', 35bf215546Sopenharmony_ci 'r600_asm.h', 36bf215546Sopenharmony_ci 'r600_blit.c', 37bf215546Sopenharmony_ci 'r600d.h', 38bf215546Sopenharmony_ci 'r600_dump.c', 39bf215546Sopenharmony_ci 'r600_dump.h', 40bf215546Sopenharmony_ci 'r600_formats.h', 41bf215546Sopenharmony_ci 'r600_hw_context.c', 42bf215546Sopenharmony_ci 'r600_isa.c', 43bf215546Sopenharmony_ci 'r600_isa.h', 44bf215546Sopenharmony_ci 'r600_opcodes.h', 45bf215546Sopenharmony_ci 'r600_pipe.c', 46bf215546Sopenharmony_ci 'r600_pipe.h', 47bf215546Sopenharmony_ci 'r600_public.h', 48bf215546Sopenharmony_ci 'r600_shader.c', 49bf215546Sopenharmony_ci 'r600_shader.h', 50bf215546Sopenharmony_ci 'r600_sq.h', 51bf215546Sopenharmony_ci 'r600_state.c', 52bf215546Sopenharmony_ci 'r600_state_common.c', 53bf215546Sopenharmony_ci 'r600_uvd.c', 54bf215546Sopenharmony_ci 'r700_asm.c', 55bf215546Sopenharmony_ci 'r700_sq.h', 56bf215546Sopenharmony_ci 'cayman_msaa.c', 57bf215546Sopenharmony_ci 'r600_buffer_common.c', 58bf215546Sopenharmony_ci 'r600_cs.h', 59bf215546Sopenharmony_ci 'r600_gpu_load.c', 60bf215546Sopenharmony_ci 'r600_perfcounter.c', 61bf215546Sopenharmony_ci 'r600_pipe_common.c', 62bf215546Sopenharmony_ci 'r600_pipe_common.h', 63bf215546Sopenharmony_ci 'r600_query.c', 64bf215546Sopenharmony_ci 'r600_query.h', 65bf215546Sopenharmony_ci 'r600_streamout.c', 66bf215546Sopenharmony_ci 'r600_test_dma.c', 67bf215546Sopenharmony_ci 'r600_texture.c', 68bf215546Sopenharmony_ci 'r600_viewport.c', 69bf215546Sopenharmony_ci 'radeon_uvd.c', 70bf215546Sopenharmony_ci 'radeon_uvd.h', 71bf215546Sopenharmony_ci 'radeon_vce.c', 72bf215546Sopenharmony_ci 'radeon_vce.h', 73bf215546Sopenharmony_ci 'radeon_video.c', 74bf215546Sopenharmony_ci 'radeon_video.h', 75bf215546Sopenharmony_ci 'sb/sb_bc_builder.cpp', 76bf215546Sopenharmony_ci 'sb/sb_bc_decoder.cpp', 77bf215546Sopenharmony_ci 'sb/sb_bc_dump.cpp', 78bf215546Sopenharmony_ci 'sb/sb_bc_finalize.cpp', 79bf215546Sopenharmony_ci 'sb/sb_bc.h', 80bf215546Sopenharmony_ci 'sb/sb_bc_parser.cpp', 81bf215546Sopenharmony_ci 'sb/sb_context.cpp', 82bf215546Sopenharmony_ci 'sb/sb_core.cpp', 83bf215546Sopenharmony_ci 'sb/sb_dce_cleanup.cpp', 84bf215546Sopenharmony_ci 'sb/sb_def_use.cpp', 85bf215546Sopenharmony_ci 'sb/sb_dump.cpp', 86bf215546Sopenharmony_ci 'sb/sb_expr.cpp', 87bf215546Sopenharmony_ci 'sb/sb_expr.h', 88bf215546Sopenharmony_ci 'sb/sb_gcm.cpp', 89bf215546Sopenharmony_ci 'sb/sb_gvn.cpp', 90bf215546Sopenharmony_ci 'sb/sb_if_conversion.cpp', 91bf215546Sopenharmony_ci 'sb/sb_ir.cpp', 92bf215546Sopenharmony_ci 'sb/sb_ir.h', 93bf215546Sopenharmony_ci 'sb/sb_liveness.cpp', 94bf215546Sopenharmony_ci 'sb/sb_pass.cpp', 95bf215546Sopenharmony_ci 'sb/sb_pass.h', 96bf215546Sopenharmony_ci 'sb/sb_peephole.cpp', 97bf215546Sopenharmony_ci 'sb/sb_psi_ops.cpp', 98bf215546Sopenharmony_ci 'sb/sb_public.h', 99bf215546Sopenharmony_ci 'sb/sb_ra_checker.cpp', 100bf215546Sopenharmony_ci 'sb/sb_ra_coalesce.cpp', 101bf215546Sopenharmony_ci 'sb/sb_ra_init.cpp', 102bf215546Sopenharmony_ci 'sb/sb_sched.cpp', 103bf215546Sopenharmony_ci 'sb/sb_sched.h', 104bf215546Sopenharmony_ci 'sb/sb_shader.cpp', 105bf215546Sopenharmony_ci 'sb/sb_shader.h', 106bf215546Sopenharmony_ci 'sb/sb_ssa_builder.cpp', 107bf215546Sopenharmony_ci 'sb/sb_valtable.cpp', 108bf215546Sopenharmony_ci 'sfn/sfn_alu_defines.cpp', 109bf215546Sopenharmony_ci 'sfn/sfn_alu_defines.h', 110bf215546Sopenharmony_ci 'sfn/sfn_alu_readport_validation.cpp', 111bf215546Sopenharmony_ci 'sfn/sfn_alu_readport_validation.h', 112bf215546Sopenharmony_ci 'sfn/sfn_assembler.cpp', 113bf215546Sopenharmony_ci 'sfn/sfn_assembler.h', 114bf215546Sopenharmony_ci 'sfn/sfn_callstack.cpp', 115bf215546Sopenharmony_ci 'sfn/sfn_callstack.h', 116bf215546Sopenharmony_ci 'sfn/sfn_conditionaljumptracker.cpp', 117bf215546Sopenharmony_ci 'sfn/sfn_conditionaljumptracker.h', 118bf215546Sopenharmony_ci 'sfn/sfn_defines.h', 119bf215546Sopenharmony_ci 'sfn/sfn_debug.cpp', 120bf215546Sopenharmony_ci 'sfn/sfn_debug.h', 121bf215546Sopenharmony_ci 'sfn/sfn_instr.cpp', 122bf215546Sopenharmony_ci 'sfn/sfn_instr.h', 123bf215546Sopenharmony_ci 'sfn/sfn_instr_alu.cpp', 124bf215546Sopenharmony_ci 'sfn/sfn_instr_alu.h', 125bf215546Sopenharmony_ci 'sfn/sfn_instr_alugroup.cpp', 126bf215546Sopenharmony_ci 'sfn/sfn_instr_alugroup.h', 127bf215546Sopenharmony_ci 'sfn/sfn_instr_controlflow.cpp', 128bf215546Sopenharmony_ci 'sfn/sfn_instr_controlflow.h', 129bf215546Sopenharmony_ci 'sfn/sfn_instr_export.cpp', 130bf215546Sopenharmony_ci 'sfn/sfn_instr_export.h', 131bf215546Sopenharmony_ci 'sfn/sfn_instr_fetch.cpp', 132bf215546Sopenharmony_ci 'sfn/sfn_instr_fetch.h', 133bf215546Sopenharmony_ci 'sfn/sfn_instr_mem.cpp', 134bf215546Sopenharmony_ci 'sfn/sfn_instr_mem.h', 135bf215546Sopenharmony_ci 'sfn/sfn_instr_lds.cpp', 136bf215546Sopenharmony_ci 'sfn/sfn_instr_lds.h', 137bf215546Sopenharmony_ci 'sfn/sfn_instr_tex.cpp', 138bf215546Sopenharmony_ci 'sfn/sfn_instr_tex.h', 139bf215546Sopenharmony_ci 'sfn/sfn_instrfactory.cpp', 140bf215546Sopenharmony_ci 'sfn/sfn_instrfactory.h', 141bf215546Sopenharmony_ci 'sfn/sfn_liverangeevaluator.cpp', 142bf215546Sopenharmony_ci 'sfn/sfn_liverangeevaluator.h', 143bf215546Sopenharmony_ci 'sfn/sfn_liverangeevaluator_helpers.cpp', 144bf215546Sopenharmony_ci 'sfn/sfn_liverangeevaluator_helpers.h', 145bf215546Sopenharmony_ci 'sfn/sfn_memorypool.cpp', 146bf215546Sopenharmony_ci 'sfn/sfn_memorypool.h', 147bf215546Sopenharmony_ci 'sfn/sfn_nir.cpp', 148bf215546Sopenharmony_ci 'sfn/sfn_nir.h', 149bf215546Sopenharmony_ci 'sfn/sfn_nir_legalize_image_load_store.cpp', 150bf215546Sopenharmony_ci 'sfn/sfn_nir_lower_64bit.cpp', 151bf215546Sopenharmony_ci 'sfn/sfn_nir_lower_alu.cpp', 152bf215546Sopenharmony_ci 'sfn/sfn_nir_lower_alu.h', 153bf215546Sopenharmony_ci 'sfn/sfn_nir_lower_tex.cpp', 154bf215546Sopenharmony_ci 'sfn/sfn_nir_lower_tex.h', 155bf215546Sopenharmony_ci 'sfn/sfn_nir_lower_fs_out_to_vector.cpp', 156bf215546Sopenharmony_ci 'sfn/sfn_nir_lower_fs_out_to_vector.h', 157bf215546Sopenharmony_ci 'sfn/sfn_nir_lower_tess_io.cpp', 158bf215546Sopenharmony_ci 'sfn/sfn_nir_vectorize_vs_inputs.c', 159bf215546Sopenharmony_ci 'sfn/sfn_optimizer.cpp', 160bf215546Sopenharmony_ci 'sfn/sfn_peephole.cpp', 161bf215546Sopenharmony_ci 'sfn/sfn_ra.cpp', 162bf215546Sopenharmony_ci 'sfn/sfn_ra.h', 163bf215546Sopenharmony_ci 'sfn/sfn_scheduler.cpp', 164bf215546Sopenharmony_ci 'sfn/sfn_scheduler.h', 165bf215546Sopenharmony_ci 'sfn/sfn_shader.cpp', 166bf215546Sopenharmony_ci 'sfn/sfn_shader.h', 167bf215546Sopenharmony_ci 'sfn/sfn_shader_cs.cpp', 168bf215546Sopenharmony_ci 'sfn/sfn_shader_cs.h', 169bf215546Sopenharmony_ci 'sfn/sfn_shader_fs.cpp', 170bf215546Sopenharmony_ci 'sfn/sfn_shader_fs.h', 171bf215546Sopenharmony_ci 'sfn/sfn_shader_gs.cpp', 172bf215546Sopenharmony_ci 'sfn/sfn_shader_gs.h', 173bf215546Sopenharmony_ci 'sfn/sfn_shader_tess.cpp', 174bf215546Sopenharmony_ci 'sfn/sfn_shader_tess.h', 175bf215546Sopenharmony_ci 'sfn/sfn_shader_vs.cpp', 176bf215546Sopenharmony_ci 'sfn/sfn_shader_vs.h', 177bf215546Sopenharmony_ci 'sfn/sfn_valuefactory.cpp', 178bf215546Sopenharmony_ci 'sfn/sfn_valuefactory.h', 179bf215546Sopenharmony_ci 'sfn/sfn_virtualvalues.cpp', 180bf215546Sopenharmony_ci 'sfn/sfn_virtualvalues.h', 181bf215546Sopenharmony_ci ) 182bf215546Sopenharmony_ci 183bf215546Sopenharmony_ciegd_tables_h = custom_target( 184bf215546Sopenharmony_ci 'egd_tables.h', 185bf215546Sopenharmony_ci input : ['egd_tables.py', 'evergreend.h'], 186bf215546Sopenharmony_ci output : 'egd_tables.h', 187bf215546Sopenharmony_ci command : [prog_python, '@INPUT@'], 188bf215546Sopenharmony_ci capture : true, 189bf215546Sopenharmony_ci) 190bf215546Sopenharmony_ci 191bf215546Sopenharmony_cir600_c_args = [] 192bf215546Sopenharmony_ciif with_gallium_opencl 193bf215546Sopenharmony_ci r600_c_args += '-DHAVE_OPENCL' 194bf215546Sopenharmony_ciendif 195bf215546Sopenharmony_ci 196bf215546Sopenharmony_cir600_cpp_args = [] 197bf215546Sopenharmony_ciif cpp.has_type('std::pmr::monotonic_buffer_resource', 198bf215546Sopenharmony_ci args:['-std=c++17'], 199bf215546Sopenharmony_ci prefix : '#include <memory_resource>') 200bf215546Sopenharmony_ci r600_cpp_args += '-DHAVE_MEMORY_RESOURCE' 201bf215546Sopenharmony_ciendif 202bf215546Sopenharmony_ci 203bf215546Sopenharmony_cilibr600 = static_library( 204bf215546Sopenharmony_ci 'r600', 205bf215546Sopenharmony_ci [files_r600, egd_tables_h], 206bf215546Sopenharmony_ci c_args : [r600_c_args, '-Wstrict-overflow=0'], 207bf215546Sopenharmony_ci cpp_args: r600_cpp_args, 208bf215546Sopenharmony_ci override_options: ['cpp_std=c++17'], 209bf215546Sopenharmony_ci gnu_symbol_visibility : 'hidden', 210bf215546Sopenharmony_ci include_directories : [ 211bf215546Sopenharmony_ci inc_src, inc_mapi, inc_mesa, inc_include, inc_compiler, inc_gallium, inc_gallium_aux, inc_amd_common, 212bf215546Sopenharmony_ci inc_gallium_drivers, 213bf215546Sopenharmony_ci ], 214bf215546Sopenharmony_ci 215bf215546Sopenharmony_ci dependencies: [dep_libdrm_radeon, dep_elf, dep_llvm, idep_nir, idep_nir_headers], 216bf215546Sopenharmony_ci) 217bf215546Sopenharmony_ci 218bf215546Sopenharmony_cidriver_r600 = declare_dependency( 219bf215546Sopenharmony_ci compile_args : '-DGALLIUM_R600', 220bf215546Sopenharmony_ci link_with : [libr600, libmesa, libradeonwinsys], 221bf215546Sopenharmony_ci) 222bf215546Sopenharmony_ci 223bf215546Sopenharmony_ciif with_tests 224bf215546Sopenharmony_ci subdir('sfn/tests') 225bf215546Sopenharmony_ciendif 226bf215546Sopenharmony_ci 227bf215546Sopenharmony_ci 228