Module: Mesa
Branch: main
Commit: d14af0043217150c299e6a6731caba30795ed1a6
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d14af0043217150c299e6a6731caba30795ed1a6

Author: Karol Herbst <[email protected]>
Date:   Tue Feb 28 22:22:18 2023 +0100

rusticl: structurize and reorder mesa binding args

It became quite a mess, I had enough 🙃

Signed-off-by: Karol Herbst <[email protected]>
Reviewed-by: Nora Allen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21612>

---

 src/gallium/frontends/rusticl/meson.build | 87 ++++++++++++++++++-------------
 1 file changed, 51 insertions(+), 36 deletions(-)

diff --git a/src/gallium/frontends/rusticl/meson.build 
b/src/gallium/frontends/rusticl/meson.build
index a3bd4180f93..e0c65149491 100644
--- a/src/gallium/frontends/rusticl/meson.build
+++ b/src/gallium/frontends/rusticl/meson.build
@@ -231,43 +231,58 @@ rusticl_mesa_bindings_rs = rust.bindgen(
   ],
   args : [
     rusticl_bindgen_args,
-    '--allowlist-function', 'blob_.*',
-    '--allowlist-function', 'clc_.*',
-    '--allowlist-function', 'disk_cache_.*',
-    '--allowlist-function', 'free',
-    '--allowlist-function', 'glsl_.*',
-    '--allowlist-function', 'malloc',
-    '--allowlist-function', 'mesa_.*',
-    '--allowlist-function', 'nir_.*',
-    '--allowlist-function', 'pipe_.*',
-    '--allowlist-function', 'rusticl_.*',
-    '--allowlist-function', 'rz?alloc_.*',
-    '--allowlist-function', 'spirv_.*',
-    '--allowlist-function', 'u_.*',
-    '--allowlist-function', 'util_format_.*',
-    '--allowlist-type', 'pipe_endian',
-    '--allowlist-type', 'pipe_resource_usage',
-    '--bitfield-enum', 'pipe_resource_usage',
-    '--allowlist-type', 'clc_kernel_arg_access_qualifier',
-    '--bitfield-enum', 'clc_kernel_arg_access_qualifier',
-    '--allowlist-type', 'clc_kernel_arg_type_qualifier',
-    '--bitfield-enum', 'clc_kernel_arg_type_qualifier',
-    '--bitfield-enum', 'nir_opt_if_options',
-    '--bitfield-enum', 'nir_variable_mode',
-    '--allowlist-type', 'float_controls',
-    '--allowlist-var', 'OS_.*',
-    '--allowlist-var', 'PIPE_.*',
-    '--bitfield-enum', 'pipe_map_flags',
-    '--allowlist-function', 'std(err|out)_ptr',
-    '--bitfield-enum', 'nir_lower_int64_options',
-    '--allowlist-type', 'pipe_tex_wrap',
-    '--constified-enum-module', 'pipe_tex_wrap',
-    '--allowlist-type', 'pipe_tex_filter',
-    '--constified-enum-module', 'pipe_tex_filter',
-    '--allowlist-type', 'gl_access_qualifier',
-    '--bitfield-enum', 'gl_access_qualifier',
-    '--allowlist-type', 'cl_sampler_.*_mode',
+    # libc
+    '--allowlist-function',     'free',
+    '--allowlist-function',     'malloc',
+
+    # mesa utils
+    '--allowlist-function',     'blob_.*',
+    '--allowlist-function',     'disk_cache_.*',
+    '--allowlist-type',         'float_controls',
+    '--allowlist-function',     'mesa_.*',
+    '--allowlist-var',          'OS_.*',
+    '--allowlist-function',     'rz?alloc_.*',
+    '--allowlist-function',     'u_.*',
+    '--allowlist-function',     'util_format_.*',
+
+    # CL API
+    '--allowlist-type',         'cl_sampler_.*_mode',
     '--constified-enum-module', 'cl_sampler_.*_mode',
+
+    # clc
+    '--allowlist-function',     'clc_.*',
+    '--allowlist-type',         'clc_kernel_arg_access_qualifier',
+    '--bitfield-enum',          'clc_kernel_arg_access_qualifier',
+    '--allowlist-type',         'clc_kernel_arg_type_qualifier',
+    '--bitfield-enum',          'clc_kernel_arg_type_qualifier',
+
+    # gl
+    '--allowlist-type',         'gl_access_qualifier',
+    '--bitfield-enum',          'gl_access_qualifier',
+    '--allowlist-function',     'glsl_.*',
+
+    # nir and spirv
+    '--allowlist-function',     'nir_.*',
+    '--bitfield-enum',          'nir_lower_int64_options',
+    '--bitfield-enum',          'nir_opt_if_options',
+    '--bitfield-enum',          'nir_variable_mode',
+    '--allowlist-function',     'spirv_.*',
+
+    # gallium
+    '--allowlist-function',     'pipe_.*',
+    '--allowlist-var',          'PIPE_.*',
+    '--allowlist-type',         'pipe_endian',
+    '--bitfield-enum',          'pipe_map_flags',
+    '--allowlist-type',         'pipe_resource_usage',
+    '--bitfield-enum',          'pipe_resource_usage',
+    '--allowlist-type',         'pipe_tex_filter',
+    '--constified-enum-module', 'pipe_tex_filter',
+    '--allowlist-type',         'pipe_tex_wrap',
+    '--constified-enum-module', 'pipe_tex_wrap',
+
+    # rusticl C functions
+    '--allowlist-function',     'rusticl_.*',
+    '--allowlist-function',     'std(err|out)_ptr',
   ],
 )
 

Reply via email to