meson: Build i965 and dri stack
[mesa.git] / src / mesa / drivers / dri / i965 / meson.build
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_i965 = files(
22 'brw_binding_tables.c',
23 'brw_blorp.c',
24 'brw_blorp.h',
25 'brw_bufmgr.c',
26 'brw_bufmgr.h',
27 'brw_clear.c',
28 'brw_clip.c',
29 'brw_compute.c',
30 'brw_conditional_render.c',
31 'brw_context.c',
32 'brw_context.h',
33 'brw_cs.c',
34 'brw_cs.h',
35 'brw_curbe.c',
36 'brw_defines.h',
37 'brw_draw.c',
38 'brw_draw.h',
39 'brw_draw_upload.c',
40 'brw_ff_gs.c',
41 'brw_ff_gs_emit.c',
42 'brw_ff_gs.h',
43 'brw_formatquery.c',
44 'brw_gs.c',
45 'brw_gs.h',
46 'brw_gs_surface_state.c',
47 'brw_link.cpp',
48 'brw_meta_util.c',
49 'brw_meta_util.h',
50 'brw_misc_state.c',
51 'brw_multisample_state.h',
52 'brw_nir_uniforms.cpp',
53 'brw_object_purgeable.c',
54 'brw_pipe_control.c',
55 'brw_performance_query.h',
56 'brw_performance_query.c',
57 'brw_program.c',
58 'brw_program.h',
59 'brw_program_cache.c',
60 'brw_primitive_restart.c',
61 'brw_queryobj.c',
62 'brw_reset.c',
63 'brw_sf.c',
64 'brw_state.h',
65 'brw_state_upload.c',
66 'brw_structs.h',
67 'brw_surface_formats.c',
68 'brw_sync.c',
69 'brw_tcs.c',
70 'brw_tcs_surface_state.c',
71 'brw_tes.c',
72 'brw_tes_surface_state.c',
73 'brw_urb.c',
74 'brw_util.c',
75 'brw_util.h',
76 'brw_vs.c',
77 'brw_vs.h',
78 'brw_vs_surface_state.c',
79 'brw_wm.c',
80 'brw_wm.h',
81 'brw_wm_surface_state.c',
82 'gen4_blorp_exec.h',
83 'gen6_clip_state.c',
84 'gen6_constant_state.c',
85 'gen6_depth_state.c',
86 'gen6_multisample_state.c',
87 'gen6_queryobj.c',
88 'gen6_sampler_state.c',
89 'gen6_sol.c',
90 'gen6_urb.c',
91 'gen7_cs_state.c',
92 'gen7_l3_state.c',
93 'gen7_misc_state.c',
94 'gen7_sol_state.c',
95 'gen7_urb.c',
96 'gen8_depth_state.c',
97 'gen8_multisample_state.c',
98 'hsw_queryobj.c',
99 'hsw_sol.c',
100 'intel_batchbuffer.c',
101 'intel_batchbuffer.h',
102 'intel_blit.c',
103 'intel_blit.h',
104 'intel_buffer_objects.c',
105 'intel_buffer_objects.h',
106 'intel_buffers.c',
107 'intel_buffers.h',
108 'intel_copy_image.c',
109 'intel_extensions.c',
110 'intel_fbo.c',
111 'intel_fbo.h',
112 'intel_image.h',
113 'intel_mipmap_tree.c',
114 'intel_mipmap_tree.h',
115 'intel_pixel_bitmap.c',
116 'intel_pixel.c',
117 'intel_pixel_copy.c',
118 'intel_pixel_draw.c',
119 'intel_pixel.h',
120 'intel_pixel_read.c',
121 'intel_screen.c',
122 'intel_screen.h',
123 'intel_state.c',
124 'intel_tex.c',
125 'intel_tex_copy.c',
126 'intel_tex.h',
127 'intel_tex_image.c',
128 'intel_tex_obj.h',
129 'intel_tex_validate.c',
130 'intel_tiled_memcpy.c',
131 'intel_tiled_memcpy.h',
132 'intel_upload.c',
133 'libdrm_macros.h',
134 )
135
136 i965_gen_libs = []
137 foreach v : ['40', '45', '50', '60', '70', '75', '80', '90', '100']
138 _lib = static_library(
139 'libi965_gen@0@'.format(v),
140 ['genX_blorp_exec.c', 'genX_state_upload.c', nir_opcodes_h, gen_xml_pack],
141 include_directories : [inc_common, inc_intel, inc_dri_common],
142 c_args : [c_vis_args, no_override_init_args, '-msse2',
143 '-DGEN_VERSIONx10=@0@'.format(v)],
144 dependencies : [dep_libdrm],
145 )
146 i965_gen_libs += _lib
147 endforeach
148
149 oa_generator = generator(
150 prog_python2,
151 arguments : ['@CURRENT_SOURCE_DIR@/brw_oa.py', '@INPUT@',
152 '--chipset', '@EXTRA_ARGS@', '--code', '@OUTPUT0@',
153 '--header', '@OUTPUT1@'],
154 output : ['@BASENAME@.c', '@BASENAME@.h'],
155 )
156
157 i965_oa_sources = []
158 foreach hw : ['hsw', 'bdw', 'chv', 'sklgt2', 'sklgt3', 'sklgt4', 'bxt',
159 'kblgt2', 'kblgt3', 'glk']
160 _xml = 'brw_oa_@0@.xml'.format(hw)
161 i965_oa_sources += oa_generator.process(_xml, extra_args : hw)
162 endforeach
163
164 libi965 = static_library(
165 'i965',
166 [files_i965, i965_oa_sources, nir_opcodes_h, ir_expression_operation_h,
167 xmlpool_options_h],
168 include_directories : [inc_common, inc_intel, inc_dri_common, inc_util,
169 inc_drm_uapi, inc_nir],
170 c_args : [c_vis_args, no_override_init_args, '-msse2'],
171 cpp_args : [cpp_vis_args, '-msse2'],
172 link_with : [i965_gen_libs, libintel_common, libisl, libintel_compiler,
173 libblorp],
174 dependencies : [dep_libdrm, dep_valgrind],
175 )
176
177 dri_drivers += libi965
178 dri_link += 'i965_dri.so'