Home | History | Annotate | Download | only in llvmpipe
      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 
     21 files_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_debug.h',
     37   'lp_draw_arrays.c',
     38   'lp_fence.c',
     39   'lp_fence.h',
     40   'lp_flush.c',
     41   'lp_flush.h',
     42   'lp_jit.c',
     43   'lp_jit.h',
     44   'lp_limits.h',
     45   'lp_memory.c',
     46   'lp_memory.h',
     47   'lp_perf.c',
     48   'lp_perf.h',
     49   'lp_public.h',
     50   'lp_query.c',
     51   'lp_query.h',
     52   'lp_rast.c',
     53   'lp_rast_debug.c',
     54   'lp_rast.h',
     55   'lp_rast_priv.h',
     56   'lp_rast_tri.c',
     57   'lp_rast_tri_tmp.h',
     58   'lp_scene.c',
     59   'lp_scene.h',
     60   'lp_scene_queue.c',
     61   'lp_scene_queue.h',
     62   'lp_screen.c',
     63   'lp_screen.h',
     64   'lp_setup.c',
     65   'lp_setup_context.h',
     66   'lp_setup.h',
     67   'lp_setup_line.c',
     68   'lp_setup_point.c',
     69   'lp_setup_tri.c',
     70   'lp_setup_vbuf.c',
     71   'lp_state_blend.c',
     72   'lp_state_clip.c',
     73   'lp_state_derived.c',
     74   'lp_state_fs.c',
     75   'lp_state_fs.h',
     76   'lp_state_gs.c',
     77   'lp_state.h',
     78   'lp_state_rasterizer.c',
     79   'lp_state_sampler.c',
     80   'lp_state_setup.c',
     81   'lp_state_setup.h',
     82   'lp_state_so.c',
     83   'lp_state_surface.c',
     84   'lp_state_vertex.c',
     85   'lp_state_vs.c',
     86   'lp_surface.c',
     87   'lp_surface.h',
     88   'lp_tex_sample.c',
     89   'lp_tex_sample.h',
     90   'lp_texture.c',
     91   'lp_texture.h',
     92 )
     93 
     94 libllvmpipe = static_library(
     95   'llvmpipe',
     96   files_llvmpipe,
     97   c_args : [c_vis_args, c_msvc_compat_args],
     98   cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
     99   include_directories : [inc_gallium, inc_gallium_aux, inc_include, inc_src],
    100   dependencies : dep_llvm,
    101 )
    102 
    103 # This overwrites the softpipe driver dependency, but itself depends on the
    104 # softpipe dependency.
    105 driver_swrast = declare_dependency(
    106   compile_args : '-DGALLIUM_LLVMPIPE',
    107   link_with : libllvmpipe,
    108   dependencies : driver_swrast,
    109 )
    110 
    111 if with_tests and with_gallium_softpipe and with_llvm
    112   foreach t : ['lp_test_format', 'lp_test_arit', 'lp_test_blend',
    113                'lp_test_conv', 'lp_test_printf']
    114     test(
    115       t,
    116       executable(
    117         t,
    118         ['@0@.c'.format(t), 'lp_test_main.c'],
    119         dependencies : [dep_llvm, dep_dl, dep_thread, dep_clock],
    120         include_directories : [inc_gallium, inc_gallium_aux, inc_include, inc_src],
    121         link_with : [libllvmpipe, libgallium, libmesa_util],
    122       )
    123     )
    124   endforeach
    125 endif
    126