diff --git a/src/gallium/frontends/rusticl/meson.build b/src/gallium/frontends/rusticl/meson.build index eff9aef6803..4b179ec4433 100644 --- a/src/gallium/frontends/rusticl/meson.build +++ b/src/gallium/frontends/rusticl/meson.build @@ -162,10 +162,18 @@ rusticl_opencl_bindings_rs = rust.bindgen( '--raw-line', 'unsafe impl std::marker::Sync for _cl_image_desc {}', '--allowlist-type', 'cl_.*', '--allowlist-var', 'CL_.*', + # needed for gl_sharing extension + '--allowlist-var', 'GL_.*', + '--allowlist-var', 'MESA_GLINTEROP_.*', + '--allowlist-type', 'PFNEGLGETPROCADDRESSPROC', + '--allowlist-type', 'PFNGLXGETPROCADDRESSPROC', + '--allowlist-type', 'PFNMESAGLINTEROP.*', # some info types need to be strongly typed so we can implement various get_infos - '--new-type-alias-deref', 'cl_(mem|image|pipe)_info', + '--new-type-alias-deref', 'cl_(mem|image|pipe|gl_texture)_info', '--new-type-alias-deref', 'cl_kernel_(arg|work_group)_info', '--new-type-alias-deref', 'cl_(event|profiling)_info', + # turn gl interop enums into constfields so we can compare with rust types + '--constified-enum', 'MESA_GLINTEROP_.*', ], ) @@ -233,6 +241,8 @@ rusticl_libc_bindings_rs = rust.bindgen( ], args : [ rusticl_bindgen_args, + '--allowlist-function', 'close', + '--allowlist-function', 'dlsym', '--allowlist-function', 'free', '--allowlist-function', 'malloc', ] @@ -312,6 +322,9 @@ rusticl_mesa_bindings_rs = rust.bindgen( # rusticl C functions '--allowlist-function', 'rusticl_.*', '--allowlist-function', 'std(err|out)_ptr', + + # winsys + '--allowlist-var', 'WINSYS_HANDLE_TYPE_.*', ], ) diff --git a/src/gallium/frontends/rusticl/rusticl_libc_bindings.h b/src/gallium/frontends/rusticl/rusticl_libc_bindings.h index c8b49f26d17..3c1504b6a4f 100644 --- a/src/gallium/frontends/rusticl/rusticl_libc_bindings.h +++ b/src/gallium/frontends/rusticl/rusticl_libc_bindings.h @@ -1 +1,3 @@ +#include +#include #include diff --git a/src/gallium/frontends/rusticl/rusticl_opencl_bindings.h b/src/gallium/frontends/rusticl/rusticl_opencl_bindings.h index 27e0498ff9d..279534e4f01 100644 --- a/src/gallium/frontends/rusticl/rusticl_opencl_bindings.h +++ b/src/gallium/frontends/rusticl/rusticl_opencl_bindings.h @@ -1,4 +1,8 @@ #include +#include +#include +#include +#include "GL/mesa_glinterop.h" #define DECL_CL_STRUCT(name) struct name { const cl_icd_dispatch *dispatch; } DECL_CL_STRUCT(_cl_command_queue);