glthread: add marshal_call_after and remove custom glFlush and glEnable code
[mesa.git] / src / mapi / glapi / gen / 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 glapi_gen_gl_xml = files('../registry/gl.xml')
22 glapi_gen_mapi_deps = [
23 glapi_gen_gl_xml,
24 genCommon_py,
25 glapi_gen_gl_xml,
26 ]
27
28 gl_and_es_api_files = files('gl_and_es_API.xml')
29
30 api_xml_files = files(
31 'gl_API.xml',
32 'es_EXT.xml',
33 'gl_and_es_API.xml',
34 'gl_and_glX_API.xml',
35 'ARB_base_instance.xml',
36 'ARB_blend_func_extended.xml',
37 'ARB_bindless_texture.xml',
38 'ARB_clear_buffer_object.xml',
39 'ARB_clear_texture.xml',
40 'ARB_clip_control.xml',
41 'ARB_color_buffer_float.xml',
42 'ARB_compressed_texture_pixel_storage.xml',
43 'ARB_compute_shader.xml',
44 'ARB_compute_variable_group_size.xml',
45 'ARB_copy_buffer.xml',
46 'ARB_copy_image.xml',
47 'ARB_debug_output.xml',
48 'ARB_depth_buffer_float.xml',
49 'ARB_depth_clamp.xml',
50 'ARB_direct_state_access.xml',
51 'ARB_draw_buffers.xml',
52 'ARB_draw_buffers_blend.xml',
53 'ARB_draw_elements_base_vertex.xml',
54 'ARB_draw_indirect.xml',
55 'ARB_draw_instanced.xml',
56 'ARB_ES2_compatibility.xml',
57 'ARB_ES3_compatibility.xml',
58 'ARB_framebuffer_no_attachments.xml',
59 'ARB_framebuffer_object.xml',
60 'ARB_get_program_binary.xml',
61 'ARB_get_texture_sub_image.xml',
62 'ARB_gl_spirv.xml',
63 'ARB_gpu_shader_fp64.xml',
64 'ARB_gpu_shader_int64.xml',
65 'ARB_gpu_shader5.xml',
66 'ARB_indirect_parameters.xml',
67 'ARB_instanced_arrays.xml',
68 'ARB_internalformat_query.xml',
69 'ARB_internalformat_query2.xml',
70 'ARB_invalidate_subdata.xml',
71 'ARB_map_buffer_range.xml',
72 'ARB_multi_bind.xml',
73 'ARB_pipeline_statistics_query.xml',
74 'ARB_program_interface_query.xml',
75 'ARB_robustness.xml',
76 'ARB_sample_shading.xml',
77 'ARB_sampler_objects.xml',
78 'ARB_seamless_cube_map.xml',
79 'ARB_separate_shader_objects.xml',
80 'ARB_shader_atomic_counters.xml',
81 'ARB_shader_image_load_store.xml',
82 'ARB_shader_subroutine.xml',
83 'ARB_shader_storage_buffer_object.xml',
84 'ARB_sparse_buffer.xml',
85 'ARB_spirv_extensions.xml',
86 'ARB_sync.xml',
87 'ARB_tessellation_shader.xml',
88 'ARB_texture_barrier.xml',
89 'ARB_texture_buffer_object.xml',
90 'ARB_texture_buffer_range.xml',
91 'ARB_texture_compression_rgtc.xml',
92 'ARB_texture_cube_map_array.xml',
93 'ARB_texture_float.xml',
94 'ARB_texture_gather.xml',
95 'ARB_texture_multisample.xml',
96 'ARB_texture_rgb10_a2ui.xml',
97 'ARB_texture_rg.xml',
98 'ARB_texture_storage_multisample.xml',
99 'ARB_texture_storage.xml',
100 'ARB_texture_view.xml',
101 'ARB_uniform_buffer_object.xml',
102 'ARB_vertex_array_object.xml',
103 'ARB_vertex_attrib_64bit.xml',
104 'ARB_vertex_attrib_binding.xml',
105 'ARB_viewport_array.xml',
106 'AMD_depth_clamp_separate.xml',
107 'AMD_draw_buffers_blend.xml',
108 'AMD_gpu_shader_int64.xml',
109 'AMD_performance_monitor.xml',
110 'ARB_vertex_type_2_10_10_10_rev.xml',
111 'APPLE_object_purgeable.xml',
112 'APPLE_vertex_array_object.xml',
113 'EXT_direct_state_access.xml',
114 'EXT_draw_buffers2.xml',
115 'EXT_external_objects.xml',
116 'EXT_external_objects_fd.xml',
117 'EXT_framebuffer_object.xml',
118 'EXT_gpu_shader4.xml',
119 'EXT_multisampled_render_to_texture.xml',
120 'EXT_packed_depth_stencil.xml',
121 'EXT_provoking_vertex.xml',
122 'EXT_separate_shader_objects.xml',
123 'EXT_shader_image_load_store.xml',
124 'EXT_texture_array.xml',
125 'EXT_texture_integer.xml',
126 'EXT_transform_feedback.xml',
127 'EXT_vertex_attrib_64bit.xml',
128 'EXT_window_rectangles.xml',
129 'GREMEDY_string_marker.xml',
130 'INTEL_performance_query.xml',
131 'KHR_debug.xml',
132 'KHR_context_flush_control.xml',
133 'KHR_robustness.xml',
134 'KHR_robustness_es.xml',
135 'KHR_texture_compression_astc.xml',
136 'NV_copy_image.xml',
137 'NV_conditional_render.xml',
138 'NV_primitive_restart.xml',
139 'NV_texture_barrier.xml',
140 'NV_vdpau_interop.xml',
141 'OES_EGL_image.xml',
142 'OES_fixed_point.xml',
143 'OES_single_precision.xml',
144 'OES_texture_compression_astc.xml',
145 'GL3x.xml',
146 'GL4x.xml',
147 )
148
149 glapi_gen_depends = files(
150 'gl_XML.py',
151 'glX_XML.py',
152 'license.py',
153 'static_data.py',
154 'typeexpr.py',
155 ) + api_xml_files
156
157 glx_gen_depends = files(
158 'glX_API.xml',
159 'glX_XML.py',
160 'glX_proto_common.py',
161 ) + api_xml_files
162
163 glapi_mapi_tmp_h = custom_target(
164 'glapi_mapi_tmp.h',
165 input : [mapi_abi_py, 'gl_and_es_API.xml'],
166 output : 'glapi_mapi_tmp.h',
167 command : [prog_python, '@INPUT0@', '--printer', 'glapi', '@INPUT1@'],
168 depend_files : glapi_gen_depends,
169 capture : true,
170 )
171
172 glprocs_h = custom_target(
173 'glprocs.h',
174 input : ['gl_procs.py', 'gl_and_es_API.xml'],
175 output : 'glprocs.h',
176 command : [prog_python, '@INPUT0@', '-c', '-f', '@INPUT1@'],
177 depend_files : glapi_gen_depends,
178 capture : true,
179 )
180
181 glapitemp_h = custom_target(
182 'glapitemp.h',
183 input : ['gl_apitemp.py', 'gl_and_es_API.xml'],
184 output : 'glapitemp.h',
185 command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
186 depend_files : glapi_gen_depends,
187 capture : true,
188 )
189
190 glapitable_h = custom_target(
191 'glapitable.h',
192 input : ['gl_table.py', 'gl_and_es_API.xml'],
193 output : 'glapitable.h',
194 command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
195 depend_files : glapi_gen_depends,
196 capture : true,
197 )
198
199 glapi_gentable_c = custom_target(
200 'glapi_gentable.c',
201 input : ['gl_gentable.py', 'gl_and_es_API.xml'],
202 output : 'glapi_gentable.c',
203 command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
204 depend_files : glapi_gen_depends,
205 capture : true,
206 )
207
208 main_enums_c = custom_target(
209 'enums.c',
210 input : ['gl_enums.py', files('../registry/gl.xml')],
211 output : 'enums.c',
212 command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
213 capture : true,
214 )
215
216 main_api_exec_c = custom_target(
217 'api_exec.c',
218 input : ['gl_genexec.py', 'gl_and_es_API.xml'],
219 output : 'api_exec.c',
220 command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
221 depend_files : files('apiexec.py') + glapi_gen_depends,
222 capture : true,
223 )
224
225 main_marshal_generated_c = custom_target(
226 'marshal_generated.c',
227 input : ['gl_marshal.py', 'gl_and_es_API.xml'],
228 output : 'marshal_generated.c',
229 command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
230 depend_files : files('marshal_XML.py') + glapi_gen_depends,
231 capture : true,
232 )
233
234 glx_generated = []
235
236 foreach x : [['indirect.c', 'proto'], ['indirect.h', 'init_h'], ['indirect_init.c', 'init_c']]
237 glx_generated += custom_target(
238 x[0],
239 input : ['glX_proto_send.py', 'gl_API.xml'],
240 output : x[0],
241 command : [prog_python, '@INPUT0@', '-f', '@INPUT1@', '-m', x[1]],
242 depend_files : glx_gen_depends,
243 capture : true,
244 )
245 endforeach
246
247 foreach x : [['indirect_size.h', ['-m', 'size_h', '--header-tag', '_INDIRECT_SIZE_H_']],
248 ['indirect_size.c', ['-m', 'size_c']]]
249 glx_generated += custom_target(
250 x[0],
251 input : ['glX_proto_size.py', 'gl_API.xml'],
252 output : x[0],
253 command : [prog_python, '@INPUT0@', '-f', '@INPUT1@', '--only-set', x[1]],
254 depend_files : glx_gen_depends,
255 capture : true,
256 )
257 endforeach
258 glx_indirect_size_h = glx_generated[3]
259
260 glapi_x86_s = custom_target(
261 'glapi_x86.S',
262 input : ['gl_x86_asm.py', gl_and_es_api_files],
263 output : 'glapi_x86.S',
264 command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
265 depend_files : glapi_gen_depends,
266 capture : true,
267 )
268
269 glapi_x86_64_s = custom_target(
270 'glapi_x86-64.S',
271 input : ['gl_x86-64_asm.py', gl_and_es_api_files],
272 output : 'glapi_x86-64.S',
273 command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
274 depend_files : glapi_gen_depends,
275 capture : true,
276 )
277
278 glapi_sparc_s = custom_target(
279 'glapi_sparc.S',
280 input : ['gl_SPARC_asm.py', gl_and_es_api_files],
281 output : 'glapi_sparc.S',
282 command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
283 depend_files : glapi_gen_depends,
284 capture : true,
285 )