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