~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/gallium/frontends/rusticl/meson.build

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
  'mesa/pipe/transfer.rs',
45
45
)
46
46
 
 
47
rusticl_proc_macros_files = files(
 
48
  'proc/lib.rs',
 
49
)
 
50
 
47
51
rusticl_files = files(
48
52
  'lib.rs',
49
53
  'api.rs',
72
76
)
73
77
 
74
78
rusticl_args = [
 
79
  # we want unsafe blocks inside unsafe functions
 
80
  '-Dunsafe_op_in_unsafe_fn',
75
81
  # we error on all clippy warnings unless they are disabled
76
82
  '-Dclippy::all',
77
83
  # we want to add asserts in control flow
88
94
rusticl_gen_args = [
89
95
  # can't do anything about it anyway
90
96
  '-Aclippy::all',
 
97
  # Some bindgen versions assume `unsafe_op_in_unsafe_fn`
 
98
  '-Aunused_unsafe',
 
99
  '-Anon_camel_case_types',
 
100
  '-Anon_snake_case',
 
101
  '-Anon_upper_case_globals',
91
102
]
92
103
 
93
104
rusticl_bindgen_args = [
158
169
  rust_crate_type : 'rlib',
159
170
  rust_args : [
160
171
    rusticl_gen_args,
161
 
    '-Anon_snake_case',
162
 
    '-Anon_camel_case_types',
163
 
    '-Anon_upper_case_globals',
164
172
  ],
165
173
)
166
174
 
225
233
  ],
226
234
  args : [
227
235
    rusticl_bindgen_args,
228
 
    '--allowlist-function', 'blob_.*',
229
 
    '--allowlist-function', 'clc_.*',
230
 
    '--allowlist-function', 'disk_cache_.*',
231
 
    '--allowlist-function', 'free',
232
 
    '--allowlist-function', 'glsl_.*',
233
 
    '--allowlist-function', 'malloc',
234
 
    '--allowlist-function', 'mesa_.*',
235
 
    '--allowlist-function', 'nir_.*',
236
 
    '--allowlist-function', 'pipe_.*',
237
 
    '--allowlist-function', 'rusticl_.*',
238
 
    '--allowlist-function', 'rz?alloc_.*',
239
 
    '--allowlist-function', 'spirv_.*',
240
 
    '--allowlist-function', 'u_.*',
241
 
    '--allowlist-function', 'util_format_.*',
242
 
    '--allowlist-type', 'pipe_endian',
243
 
    '--allowlist-type', 'pipe_resource_usage',
244
 
    '--bitfield-enum', 'pipe_resource_usage',
245
 
    '--allowlist-type', 'clc_kernel_arg_access_qualifier',
246
 
    '--bitfield-enum', 'clc_kernel_arg_access_qualifier',
247
 
    '--allowlist-type', 'clc_kernel_arg_type_qualifier',
248
 
    '--bitfield-enum', 'clc_kernel_arg_type_qualifier',
249
 
    '--bitfield-enum', 'nir_opt_if_options',
250
 
    '--bitfield-enum', 'nir_variable_mode',
251
 
    '--allowlist-type', 'float_controls',
252
 
    '--allowlist-var', 'PIPE_.*',
253
 
    '--bitfield-enum', 'pipe_map_flags',
254
 
    '--allowlist-function', 'std(err|out)_ptr',
255
 
    '--bitfield-enum', 'nir_lower_int64_options',
256
 
    '--allowlist-type', 'pipe_tex_wrap',
 
236
    # libc
 
237
    '--allowlist-function',     'free',
 
238
    '--allowlist-function',     'malloc',
 
239
 
 
240
    # mesa utils
 
241
    '--allowlist-function',     'blob_.*',
 
242
    '--allowlist-function',     'disk_cache_.*',
 
243
    '--allowlist-type',         'float_controls',
 
244
    '--allowlist-function',     'mesa_.*',
 
245
    '--allowlist-var',          'OS_.*',
 
246
    '--allowlist-function',     'rz?alloc_.*',
 
247
    '--allowlist-function',     'SHA1.*',
 
248
    '--allowlist-var',          'SHA1_.*',
 
249
    '--allowlist-function',     'u_.*',
 
250
    '--allowlist-function',     'util_format_.*',
 
251
 
 
252
    # CL API
 
253
    '--allowlist-type',         'cl_sampler_.*_mode',
 
254
    '--constified-enum-module', 'cl_sampler_.*_mode',
 
255
 
 
256
    # clc
 
257
    '--allowlist-function',     'clc_.*',
 
258
    '--allowlist-type',         'clc_kernel_arg_access_qualifier',
 
259
    '--bitfield-enum',          'clc_kernel_arg_access_qualifier',
 
260
    '--allowlist-type',         'clc_kernel_arg_type_qualifier',
 
261
    '--bitfield-enum',          'clc_kernel_arg_type_qualifier',
 
262
 
 
263
    # gl
 
264
    '--allowlist-type',         'gl_access_qualifier',
 
265
    '--bitfield-enum',          'gl_access_qualifier',
 
266
    '--allowlist-function',     'glsl_.*',
 
267
 
 
268
    # nir and spirv
 
269
    '--allowlist-function',     'nir_.*',
 
270
    '--bitfield-enum',          'nir_lower_int64_options',
 
271
    '--bitfield-enum',          'nir_opt_if_options',
 
272
    '--bitfield-enum',          'nir_variable_mode',
 
273
    '--allowlist-function',     'spirv_.*',
 
274
 
 
275
    # gallium
 
276
    '--allowlist-function',     'pipe_.*',
 
277
    '--allowlist-var',          'PIPE_.*',
 
278
    '--allowlist-type',         'pipe_endian',
 
279
    '--bitfield-enum',          'pipe_map_flags',
 
280
    '--allowlist-type',         'pipe_resource_usage',
 
281
    '--bitfield-enum',          'pipe_resource_usage',
 
282
    '--allowlist-type',         'pipe_tex_filter',
 
283
    '--constified-enum-module', 'pipe_tex_filter',
 
284
    '--allowlist-type',         'pipe_tex_wrap',
257
285
    '--constified-enum-module', 'pipe_tex_wrap',
258
 
    '--allowlist-type', 'pipe_tex_filter',
259
 
    '--constified-enum-module', 'pipe_tex_filter',
260
 
    '--allowlist-type', 'gl_access_qualifier',
261
 
    '--bitfield-enum', 'gl_access_qualifier',
262
 
    '--allowlist-type', 'cl_sampler_.*_mode',
263
 
    '--constified-enum-module', 'cl_sampler_.*_mode',
 
286
 
 
287
    # rusticl C functions
 
288
    '--allowlist-function',     'rusticl_.*',
 
289
    '--allowlist-function',     'std(err|out)_ptr',
264
290
  ],
265
291
)
266
292
 
278
304
    libgallium,
279
305
  ],
280
306
  dependencies: [
281
 
    idep_clc,
 
307
    idep_mesaclc,
282
308
  ],
283
309
  rust_crate_type : 'rlib',
284
310
  rust_args : [
285
311
    rusticl_gen_args,
286
 
    '-Anon_snake_case',
287
 
    '-Anon_camel_case_types',
288
 
    '-Anon_upper_case_globals',
289
312
  ],
290
313
)
291
314
 
315
338
  ]
316
339
)
317
340
 
 
341
rusticl_proc_macros = shared_library(
 
342
  'rusticl_proc_macros',
 
343
  [rusticl_proc_macros_files],
 
344
  rust_crate_type : 'proc-macro',
 
345
  rust_args : [
 
346
    rusticl_args,
 
347
  ],
 
348
)
 
349
 
318
350
librusticl = static_library(
319
351
  'rusticl',
320
352
  [rusticl_files],
328
360
    libmesa_rust_gen,
329
361
    libmesa_rust_util,
330
362
    rusticl_opencl_gen,
 
363
    rusticl_proc_macros,
331
364
  ],
332
365
  dependencies : [
333
366
    idep_rusticl_gen,