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_llvmpipe = files( 22bf215546Sopenharmony_ci 'lp_bld_alpha.c', 23bf215546Sopenharmony_ci 'lp_bld_alpha.h', 24bf215546Sopenharmony_ci 'lp_bld_blend_aos.c', 25bf215546Sopenharmony_ci 'lp_bld_blend.c', 26bf215546Sopenharmony_ci 'lp_bld_blend.h', 27bf215546Sopenharmony_ci 'lp_bld_blend_logicop.c', 28bf215546Sopenharmony_ci 'lp_bld_depth.c', 29bf215546Sopenharmony_ci 'lp_bld_depth.h', 30bf215546Sopenharmony_ci 'lp_bld_interp.c', 31bf215546Sopenharmony_ci 'lp_bld_interp.h', 32bf215546Sopenharmony_ci 'lp_clear.c', 33bf215546Sopenharmony_ci 'lp_clear.h', 34bf215546Sopenharmony_ci 'lp_context.c', 35bf215546Sopenharmony_ci 'lp_context.h', 36bf215546Sopenharmony_ci 'lp_cs_tpool.h', 37bf215546Sopenharmony_ci 'lp_cs_tpool.c', 38bf215546Sopenharmony_ci 'lp_debug.h', 39bf215546Sopenharmony_ci 'lp_draw_arrays.c', 40bf215546Sopenharmony_ci 'lp_fence.c', 41bf215546Sopenharmony_ci 'lp_fence.h', 42bf215546Sopenharmony_ci 'lp_flush.c', 43bf215546Sopenharmony_ci 'lp_flush.h', 44bf215546Sopenharmony_ci 'lp_jit.c', 45bf215546Sopenharmony_ci 'lp_jit.h', 46bf215546Sopenharmony_ci 'lp_limits.h', 47bf215546Sopenharmony_ci 'lp_linear.c', 48bf215546Sopenharmony_ci 'lp_linear_fastpath.c', 49bf215546Sopenharmony_ci 'lp_linear_interp.c', 50bf215546Sopenharmony_ci 'lp_linear_sampler.c', 51bf215546Sopenharmony_ci 'lp_memory.c', 52bf215546Sopenharmony_ci 'lp_memory.h', 53bf215546Sopenharmony_ci 'lp_perf.c', 54bf215546Sopenharmony_ci 'lp_perf.h', 55bf215546Sopenharmony_ci 'lp_public.h', 56bf215546Sopenharmony_ci 'lp_query.c', 57bf215546Sopenharmony_ci 'lp_query.h', 58bf215546Sopenharmony_ci 'lp_rast.c', 59bf215546Sopenharmony_ci 'lp_rast_debug.c', 60bf215546Sopenharmony_ci 'lp_rast.h', 61bf215546Sopenharmony_ci 'lp_rast_linear.c', 62bf215546Sopenharmony_ci 'lp_rast_linear_fallback.c', 63bf215546Sopenharmony_ci 'lp_rast_priv.h', 64bf215546Sopenharmony_ci 'lp_rast_rect.c', 65bf215546Sopenharmony_ci 'lp_rast_tri.c', 66bf215546Sopenharmony_ci 'lp_rast_tri_tmp.h', 67bf215546Sopenharmony_ci 'lp_scene.c', 68bf215546Sopenharmony_ci 'lp_scene.h', 69bf215546Sopenharmony_ci 'lp_scene_queue.c', 70bf215546Sopenharmony_ci 'lp_scene_queue.h', 71bf215546Sopenharmony_ci 'lp_screen.c', 72bf215546Sopenharmony_ci 'lp_screen.h', 73bf215546Sopenharmony_ci 'lp_setup.c', 74bf215546Sopenharmony_ci 'lp_setup_analysis.c', 75bf215546Sopenharmony_ci 'lp_setup_context.h', 76bf215546Sopenharmony_ci 'lp_setup.h', 77bf215546Sopenharmony_ci 'lp_setup_line.c', 78bf215546Sopenharmony_ci 'lp_setup_point.c', 79bf215546Sopenharmony_ci 'lp_setup_rect.c', 80bf215546Sopenharmony_ci 'lp_setup_tri.c', 81bf215546Sopenharmony_ci 'lp_setup_vbuf.c', 82bf215546Sopenharmony_ci 'lp_state_blend.c', 83bf215546Sopenharmony_ci 'lp_state_clip.c', 84bf215546Sopenharmony_ci 'lp_state_derived.c', 85bf215546Sopenharmony_ci 'lp_state_cs.c', 86bf215546Sopenharmony_ci 'lp_state_cs.h', 87bf215546Sopenharmony_ci 'lp_state_fs.c', 88bf215546Sopenharmony_ci 'lp_state_fs.h', 89bf215546Sopenharmony_ci 'lp_state_fs_analysis.c', 90bf215546Sopenharmony_ci 'lp_state_fs_fastpath.c', 91bf215546Sopenharmony_ci 'lp_state_fs_linear.c', 92bf215546Sopenharmony_ci 'lp_state_fs_linear_llvm.c', 93bf215546Sopenharmony_ci 'lp_state_gs.c', 94bf215546Sopenharmony_ci 'lp_state.h', 95bf215546Sopenharmony_ci 'lp_state_rasterizer.c', 96bf215546Sopenharmony_ci 'lp_state_sampler.c', 97bf215546Sopenharmony_ci 'lp_state_setup.c', 98bf215546Sopenharmony_ci 'lp_state_setup.h', 99bf215546Sopenharmony_ci 'lp_state_so.c', 100bf215546Sopenharmony_ci 'lp_state_surface.c', 101bf215546Sopenharmony_ci 'lp_state_tess.c', 102bf215546Sopenharmony_ci 'lp_state_vertex.c', 103bf215546Sopenharmony_ci 'lp_state_vs.c', 104bf215546Sopenharmony_ci 'lp_surface.c', 105bf215546Sopenharmony_ci 'lp_surface.h', 106bf215546Sopenharmony_ci 'lp_tex_sample.c', 107bf215546Sopenharmony_ci 'lp_tex_sample.h', 108bf215546Sopenharmony_ci 'lp_texture.c', 109bf215546Sopenharmony_ci 'lp_texture.h', 110bf215546Sopenharmony_ci) 111bf215546Sopenharmony_ci 112bf215546Sopenharmony_cilibllvmpipe = static_library( 113bf215546Sopenharmony_ci 'llvmpipe', 114bf215546Sopenharmony_ci [files_llvmpipe, sha1_h], 115bf215546Sopenharmony_ci c_args : [c_msvc_compat_args], 116bf215546Sopenharmony_ci cpp_args : [cpp_msvc_compat_args], 117bf215546Sopenharmony_ci gnu_symbol_visibility : 'hidden', 118bf215546Sopenharmony_ci include_directories : [inc_gallium, inc_gallium_aux, inc_include, inc_src], 119bf215546Sopenharmony_ci dependencies : [ dep_llvm, idep_nir_headers, idep_mesautil ], 120bf215546Sopenharmony_ci) 121bf215546Sopenharmony_ci 122bf215546Sopenharmony_ci# This overwrites the softpipe driver dependency, but itself depends on the 123bf215546Sopenharmony_ci# softpipe dependency. 124bf215546Sopenharmony_cidriver_swrast = declare_dependency( 125bf215546Sopenharmony_ci compile_args : '-DGALLIUM_LLVMPIPE', 126bf215546Sopenharmony_ci link_with : libllvmpipe, 127bf215546Sopenharmony_ci dependencies : [driver_swrast, dep_llvm, idep_mesautil], 128bf215546Sopenharmony_ci) 129bf215546Sopenharmony_ci 130bf215546Sopenharmony_ciif with_tests and with_gallium_softpipe and draw_with_llvm 131bf215546Sopenharmony_ci foreach t : ['lp_test_format', 'lp_test_arit', 'lp_test_blend', 132bf215546Sopenharmony_ci 'lp_test_conv', 'lp_test_printf'] 133bf215546Sopenharmony_ci test( 134bf215546Sopenharmony_ci t, 135bf215546Sopenharmony_ci executable( 136bf215546Sopenharmony_ci t, 137bf215546Sopenharmony_ci ['@0@.c'.format(t), 'lp_test_main.c', sha1_h], 138bf215546Sopenharmony_ci dependencies : [dep_llvm, dep_dl, dep_clock, idep_mesautil], 139bf215546Sopenharmony_ci include_directories : [inc_gallium, inc_gallium_aux, inc_include, inc_src], 140bf215546Sopenharmony_ci link_with : [libllvmpipe, libgallium], 141bf215546Sopenharmony_ci ), 142bf215546Sopenharmony_ci suite : ['llvmpipe'], 143bf215546Sopenharmony_ci should_fail : meson.get_cross_property('xfail', '').contains(t), 144bf215546Sopenharmony_ci timeout: 240, 145bf215546Sopenharmony_ci ) 146bf215546Sopenharmony_ci endforeach 147bf215546Sopenharmony_ciendif 148