1b8e80941Smrg# Copyright © 2017 Intel Corporation 2b8e80941Smrg 3b8e80941Smrg# Permission is hereby granted, free of charge, to any person obtaining a copy 4b8e80941Smrg# of this software and associated documentation files (the "Software"), to deal 5b8e80941Smrg# in the Software without restriction, including without limitation the rights 6b8e80941Smrg# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7b8e80941Smrg# copies of the Software, and to permit persons to whom the Software is 8b8e80941Smrg# furnished to do so, subject to the following conditions: 9b8e80941Smrg 10b8e80941Smrg# The above copyright notice and this permission notice shall be included in 11b8e80941Smrg# all copies or substantial portions of the Software. 12b8e80941Smrg 13b8e80941Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14b8e80941Smrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15b8e80941Smrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16b8e80941Smrg# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17b8e80941Smrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18b8e80941Smrg# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19b8e80941Smrg# SOFTWARE. 20b8e80941Smrg 21b8e80941Smrgfiles_llvmpipe = files( 22b8e80941Smrg 'lp_bld_alpha.c', 23b8e80941Smrg 'lp_bld_alpha.h', 24b8e80941Smrg 'lp_bld_blend_aos.c', 25b8e80941Smrg 'lp_bld_blend.c', 26b8e80941Smrg 'lp_bld_blend.h', 27b8e80941Smrg 'lp_bld_blend_logicop.c', 28b8e80941Smrg 'lp_bld_depth.c', 29b8e80941Smrg 'lp_bld_depth.h', 30b8e80941Smrg 'lp_bld_interp.c', 31b8e80941Smrg 'lp_bld_interp.h', 32b8e80941Smrg 'lp_clear.c', 33b8e80941Smrg 'lp_clear.h', 34b8e80941Smrg 'lp_context.c', 35b8e80941Smrg 'lp_context.h', 36b8e80941Smrg 'lp_debug.h', 37b8e80941Smrg 'lp_draw_arrays.c', 38b8e80941Smrg 'lp_fence.c', 39b8e80941Smrg 'lp_fence.h', 40b8e80941Smrg 'lp_flush.c', 41b8e80941Smrg 'lp_flush.h', 42b8e80941Smrg 'lp_jit.c', 43b8e80941Smrg 'lp_jit.h', 44b8e80941Smrg 'lp_limits.h', 45b8e80941Smrg 'lp_memory.c', 46b8e80941Smrg 'lp_memory.h', 47b8e80941Smrg 'lp_perf.c', 48b8e80941Smrg 'lp_perf.h', 49b8e80941Smrg 'lp_public.h', 50b8e80941Smrg 'lp_query.c', 51b8e80941Smrg 'lp_query.h', 52b8e80941Smrg 'lp_rast.c', 53b8e80941Smrg 'lp_rast_debug.c', 54b8e80941Smrg 'lp_rast.h', 55b8e80941Smrg 'lp_rast_priv.h', 56b8e80941Smrg 'lp_rast_tri.c', 57b8e80941Smrg 'lp_rast_tri_tmp.h', 58b8e80941Smrg 'lp_scene.c', 59b8e80941Smrg 'lp_scene.h', 60b8e80941Smrg 'lp_scene_queue.c', 61b8e80941Smrg 'lp_scene_queue.h', 62b8e80941Smrg 'lp_screen.c', 63b8e80941Smrg 'lp_screen.h', 64b8e80941Smrg 'lp_setup.c', 65b8e80941Smrg 'lp_setup_context.h', 66b8e80941Smrg 'lp_setup.h', 67b8e80941Smrg 'lp_setup_line.c', 68b8e80941Smrg 'lp_setup_point.c', 69b8e80941Smrg 'lp_setup_tri.c', 70b8e80941Smrg 'lp_setup_vbuf.c', 71b8e80941Smrg 'lp_state_blend.c', 72b8e80941Smrg 'lp_state_clip.c', 73b8e80941Smrg 'lp_state_derived.c', 74b8e80941Smrg 'lp_state_fs.c', 75b8e80941Smrg 'lp_state_fs.h', 76b8e80941Smrg 'lp_state_gs.c', 77b8e80941Smrg 'lp_state.h', 78b8e80941Smrg 'lp_state_rasterizer.c', 79b8e80941Smrg 'lp_state_sampler.c', 80b8e80941Smrg 'lp_state_setup.c', 81b8e80941Smrg 'lp_state_setup.h', 82b8e80941Smrg 'lp_state_so.c', 83b8e80941Smrg 'lp_state_surface.c', 84b8e80941Smrg 'lp_state_vertex.c', 85b8e80941Smrg 'lp_state_vs.c', 86b8e80941Smrg 'lp_surface.c', 87b8e80941Smrg 'lp_surface.h', 88b8e80941Smrg 'lp_tex_sample.c', 89b8e80941Smrg 'lp_tex_sample.h', 90b8e80941Smrg 'lp_texture.c', 91b8e80941Smrg 'lp_texture.h', 92b8e80941Smrg) 93b8e80941Smrg 94b8e80941Smrglibllvmpipe = static_library( 95b8e80941Smrg 'llvmpipe', 96b8e80941Smrg files_llvmpipe, 97b8e80941Smrg c_args : [c_vis_args, c_msvc_compat_args], 98b8e80941Smrg cpp_args : [cpp_vis_args, cpp_msvc_compat_args], 99b8e80941Smrg include_directories : [inc_gallium, inc_gallium_aux, inc_include, inc_src], 100b8e80941Smrg dependencies : dep_llvm, 101b8e80941Smrg) 102b8e80941Smrg 103b8e80941Smrg# This overwrites the softpipe driver dependency, but itself depends on the 104b8e80941Smrg# softpipe dependency. 105b8e80941Smrgdriver_swrast = declare_dependency( 106b8e80941Smrg compile_args : '-DGALLIUM_LLVMPIPE', 107b8e80941Smrg link_with : libllvmpipe, 108b8e80941Smrg dependencies : driver_swrast, 109b8e80941Smrg) 110b8e80941Smrg 111b8e80941Smrgif with_tests and with_gallium_softpipe and with_llvm 112b8e80941Smrg foreach t : ['lp_test_format', 'lp_test_arit', 'lp_test_blend', 113b8e80941Smrg 'lp_test_conv', 'lp_test_printf'] 114b8e80941Smrg test( 115b8e80941Smrg t, 116b8e80941Smrg executable( 117b8e80941Smrg t, 118b8e80941Smrg ['@0@.c'.format(t), 'lp_test_main.c'], 119b8e80941Smrg dependencies : [dep_llvm, dep_dl, dep_thread, dep_clock], 120b8e80941Smrg include_directories : [inc_gallium, inc_gallium_aux, inc_include, inc_src], 121b8e80941Smrg link_with : [libllvmpipe, libgallium, libmesa_util], 122b8e80941Smrg ), 123b8e80941Smrg suite : ['llvmpipe'], 124b8e80941Smrg ) 125b8e80941Smrg endforeach 126b8e80941Smrgendif 127