• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_linear.c',
48  'lp_linear_fastpath.c',
49  'lp_linear_interp.c',
50  'lp_linear_sampler.c',
51  'lp_memory.c',
52  'lp_memory.h',
53  'lp_perf.c',
54  'lp_perf.h',
55  'lp_public.h',
56  'lp_query.c',
57  'lp_query.h',
58  'lp_rast.c',
59  'lp_rast_debug.c',
60  'lp_rast.h',
61  'lp_rast_linear.c',
62  'lp_rast_linear_fallback.c',
63  'lp_rast_priv.h',
64  'lp_rast_rect.c',
65  'lp_rast_tri.c',
66  'lp_rast_tri_tmp.h',
67  'lp_scene.c',
68  'lp_scene.h',
69  'lp_scene_queue.c',
70  'lp_scene_queue.h',
71  'lp_screen.c',
72  'lp_screen.h',
73  'lp_setup.c',
74  'lp_setup_analysis.c',
75  'lp_setup_context.h',
76  'lp_setup.h',
77  'lp_setup_line.c',
78  'lp_setup_point.c',
79  'lp_setup_rect.c',
80  'lp_setup_tri.c',
81  'lp_setup_vbuf.c',
82  'lp_state_blend.c',
83  'lp_state_clip.c',
84  'lp_state_derived.c',
85  'lp_state_cs.c',
86  'lp_state_cs.h',
87  'lp_state_fs.c',
88  'lp_state_fs.h',
89  'lp_state_fs_analysis.c',
90  'lp_state_fs_fastpath.c',
91  'lp_state_fs_linear.c',
92  'lp_state_fs_linear_llvm.c',
93  'lp_state_gs.c',
94  'lp_state.h',
95  'lp_state_rasterizer.c',
96  'lp_state_sampler.c',
97  'lp_state_setup.c',
98  'lp_state_setup.h',
99  'lp_state_so.c',
100  'lp_state_surface.c',
101  'lp_state_tess.c',
102  'lp_state_vertex.c',
103  'lp_state_vs.c',
104  'lp_surface.c',
105  'lp_surface.h',
106  'lp_tex_sample.c',
107  'lp_tex_sample.h',
108  'lp_texture.c',
109  'lp_texture.h',
110)
111
112libllvmpipe = static_library(
113  'llvmpipe',
114  [files_llvmpipe, sha1_h],
115  c_args : [c_msvc_compat_args],
116  cpp_args : [cpp_msvc_compat_args],
117  gnu_symbol_visibility : 'hidden',
118  include_directories : [inc_gallium, inc_gallium_aux, inc_include, inc_src],
119  dependencies : [ dep_llvm, idep_nir_headers, idep_mesautil ],
120)
121
122# This overwrites the softpipe driver dependency, but itself depends on the
123# softpipe dependency.
124driver_swrast = declare_dependency(
125  compile_args : '-DGALLIUM_LLVMPIPE',
126  link_with : libllvmpipe,
127  dependencies : [driver_swrast, dep_llvm, idep_mesautil],
128)
129
130if with_tests and with_gallium_softpipe and draw_with_llvm
131  foreach t : ['lp_test_format', 'lp_test_arit', 'lp_test_blend',
132               'lp_test_conv', 'lp_test_printf']
133    test(
134      t,
135      executable(
136        t,
137        ['@0@.c'.format(t), 'lp_test_main.c', sha1_h],
138        dependencies : [dep_llvm, dep_dl, dep_clock, idep_mesautil],
139        include_directories : [inc_gallium, inc_gallium_aux, inc_include, inc_src],
140        link_with : [libllvmpipe, libgallium],
141      ),
142      suite : ['llvmpipe'],
143      should_fail : meson.get_cross_property('xfail', '').contains(t),
144      timeout: 240,
145    )
146  endforeach
147endif
148