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