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_etnaviv = files( 22bf215546Sopenharmony_ci 'hw/cmdstream.xml.h', 23bf215546Sopenharmony_ci 'hw/common.xml.h', 24bf215546Sopenharmony_ci 'hw/common_3d.xml.h', 25bf215546Sopenharmony_ci 'hw/isa.xml.h', 26bf215546Sopenharmony_ci 'hw/state_3d.xml.h', 27bf215546Sopenharmony_ci 'hw/state_blt.xml.h', 28bf215546Sopenharmony_ci 'hw/state.xml.h', 29bf215546Sopenharmony_ci 'hw/texdesc_3d.xml.h', 30bf215546Sopenharmony_ci 'etnaviv_asm.c', 31bf215546Sopenharmony_ci 'etnaviv_asm.h', 32bf215546Sopenharmony_ci 'etnaviv_blend.c', 33bf215546Sopenharmony_ci 'etnaviv_blend.h', 34bf215546Sopenharmony_ci 'etnaviv_blt.c', 35bf215546Sopenharmony_ci 'etnaviv_blt.h', 36bf215546Sopenharmony_ci 'etnaviv_clear_blit.c', 37bf215546Sopenharmony_ci 'etnaviv_clear_blit.h', 38bf215546Sopenharmony_ci 'etnaviv_compiler.c', 39bf215546Sopenharmony_ci 'etnaviv_compiler.h', 40bf215546Sopenharmony_ci 'etnaviv_compiler_nir.c', 41bf215546Sopenharmony_ci 'etnaviv_compiler_nir_emit.c', 42bf215546Sopenharmony_ci 'etnaviv_compiler_nir_liveness.c', 43bf215546Sopenharmony_ci 'etnaviv_compiler_nir_ra.c', 44bf215546Sopenharmony_ci 'etnaviv_context.c', 45bf215546Sopenharmony_ci 'etnaviv_context.h', 46bf215546Sopenharmony_ci 'etnaviv_debug.h', 47bf215546Sopenharmony_ci 'etnaviv_disasm.c', 48bf215546Sopenharmony_ci 'etnaviv_disasm.h', 49bf215546Sopenharmony_ci 'etnaviv_disk_cache.c', 50bf215546Sopenharmony_ci 'etnaviv_disk_cache.h', 51bf215546Sopenharmony_ci 'etnaviv_emit.c', 52bf215546Sopenharmony_ci 'etnaviv_emit.h', 53bf215546Sopenharmony_ci 'etnaviv_etc2.c', 54bf215546Sopenharmony_ci 'etnaviv_etc2.h', 55bf215546Sopenharmony_ci 'etnaviv_fence.c', 56bf215546Sopenharmony_ci 'etnaviv_fence.h', 57bf215546Sopenharmony_ci 'etnaviv_format.c', 58bf215546Sopenharmony_ci 'etnaviv_format.h', 59bf215546Sopenharmony_ci 'etnaviv_internal.h', 60bf215546Sopenharmony_ci 'etnaviv_nir_lower_ubo_to_uniform.c', 61bf215546Sopenharmony_ci 'etnaviv_nir.c', 62bf215546Sopenharmony_ci 'etnaviv_nir.h', 63bf215546Sopenharmony_ci 'etnaviv_perfmon.c', 64bf215546Sopenharmony_ci 'etnaviv_perfmon.h', 65bf215546Sopenharmony_ci 'etnaviv_query.c', 66bf215546Sopenharmony_ci 'etnaviv_query.h', 67bf215546Sopenharmony_ci 'etnaviv_query_acc_occlusion.c', 68bf215546Sopenharmony_ci 'etnaviv_query_acc_perfmon.c', 69bf215546Sopenharmony_ci 'etnaviv_query_acc.c', 70bf215546Sopenharmony_ci 'etnaviv_query_acc.h', 71bf215546Sopenharmony_ci 'etnaviv_query_sw.c', 72bf215546Sopenharmony_ci 'etnaviv_query_sw.h', 73bf215546Sopenharmony_ci 'etnaviv_rasterizer.c', 74bf215546Sopenharmony_ci 'etnaviv_rasterizer.h', 75bf215546Sopenharmony_ci 'etnaviv_resource.c', 76bf215546Sopenharmony_ci 'etnaviv_resource.h', 77bf215546Sopenharmony_ci 'etnaviv_rs.c', 78bf215546Sopenharmony_ci 'etnaviv_rs.h', 79bf215546Sopenharmony_ci 'etnaviv_screen.c', 80bf215546Sopenharmony_ci 'etnaviv_screen.h', 81bf215546Sopenharmony_ci 'etnaviv_shader.c', 82bf215546Sopenharmony_ci 'etnaviv_shader.h', 83bf215546Sopenharmony_ci 'etnaviv_state.c', 84bf215546Sopenharmony_ci 'etnaviv_state.h', 85bf215546Sopenharmony_ci 'etnaviv_surface.c', 86bf215546Sopenharmony_ci 'etnaviv_surface.h', 87bf215546Sopenharmony_ci 'etnaviv_texture.c', 88bf215546Sopenharmony_ci 'etnaviv_texture.h', 89bf215546Sopenharmony_ci 'etnaviv_texture_desc.c', 90bf215546Sopenharmony_ci 'etnaviv_texture_desc.h', 91bf215546Sopenharmony_ci 'etnaviv_texture_state.c', 92bf215546Sopenharmony_ci 'etnaviv_texture_state.h', 93bf215546Sopenharmony_ci 'etnaviv_tiling.c', 94bf215546Sopenharmony_ci 'etnaviv_tiling.h', 95bf215546Sopenharmony_ci 'etnaviv_transfer.c', 96bf215546Sopenharmony_ci 'etnaviv_transfer.h', 97bf215546Sopenharmony_ci 'etnaviv_translate.h', 98bf215546Sopenharmony_ci 'etnaviv_uniforms.c', 99bf215546Sopenharmony_ci 'etnaviv_uniforms.h', 100bf215546Sopenharmony_ci 'etnaviv_util.h', 101bf215546Sopenharmony_ci 'etnaviv_zsa.c', 102bf215546Sopenharmony_ci 'etnaviv_zsa.h', 103bf215546Sopenharmony_ci) 104bf215546Sopenharmony_ci 105bf215546Sopenharmony_cilibetnaviv = static_library( 106bf215546Sopenharmony_ci 'etnaviv', 107bf215546Sopenharmony_ci files_etnaviv, 108bf215546Sopenharmony_ci gnu_symbol_visibility : 'hidden', 109bf215546Sopenharmony_ci include_directories : [ 110bf215546Sopenharmony_ci inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_etnaviv, 111bf215546Sopenharmony_ci ], 112bf215546Sopenharmony_ci link_with: libetnaviv_drm, 113bf215546Sopenharmony_ci dependencies : [dep_libdrm, idep_nir_headers, idep_mesautil], 114bf215546Sopenharmony_ci) 115bf215546Sopenharmony_ci 116bf215546Sopenharmony_cietnaviv_compiler = executable( 117bf215546Sopenharmony_ci 'etnaviv_compiler', 118bf215546Sopenharmony_ci 'etnaviv_compiler_cmdline.c', 119bf215546Sopenharmony_ci include_directories : [ 120bf215546Sopenharmony_ci inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_etnaviv, 121bf215546Sopenharmony_ci ], 122bf215546Sopenharmony_ci link_with : [libgallium, libetnaviv, libetnaviv_drm], 123bf215546Sopenharmony_ci build_by_default : with_tools.contains('etnaviv'), 124bf215546Sopenharmony_ci install : with_tools.contains('etnaviv'), 125bf215546Sopenharmony_ci dependencies : [idep_mesautil, dep_libdrm, idep_nir], 126bf215546Sopenharmony_ci) 127bf215546Sopenharmony_ci 128bf215546Sopenharmony_cidriver_etnaviv = declare_dependency( 129bf215546Sopenharmony_ci compile_args : '-DGALLIUM_ETNAVIV', 130bf215546Sopenharmony_ci link_with : [libetnaviv, libetnavivdrm], 131bf215546Sopenharmony_ci dependencies : idep_nir, 132bf215546Sopenharmony_ci) 133bf215546Sopenharmony_ci 134bf215546Sopenharmony_ciif with_tests 135bf215546Sopenharmony_ci test( 136bf215546Sopenharmony_ci 'lower_ubo', 137bf215546Sopenharmony_ci executable( 138bf215546Sopenharmony_ci 'nir_lower_ubo_test', 139bf215546Sopenharmony_ci files('tests/lower_ubo_tests.cpp'), 140bf215546Sopenharmony_ci cpp_args : [cpp_msvc_compat_args], 141bf215546Sopenharmony_ci gnu_symbol_visibility : 'hidden', 142bf215546Sopenharmony_ci include_directories : [inc_include, inc_src, inc_gallium], 143bf215546Sopenharmony_ci link_with : [libetnaviv], 144bf215546Sopenharmony_ci dependencies : [idep_gtest, idep_nir], 145bf215546Sopenharmony_ci ), 146bf215546Sopenharmony_ci suite : ['compiler', 'etnaviv'], 147bf215546Sopenharmony_ci protocol : gtest_test_protocol, 148bf215546Sopenharmony_ci ) 149bf215546Sopenharmony_ciendif 150