rusticl: generate bindings for build-id stuff

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21612>
This commit is contained in:
Karol Herbst 2023-03-01 00:38:50 +01:00 committed by Marge Bot
parent d14af00432
commit c896373889
4 changed files with 23 additions and 0 deletions

View file

@ -242,6 +242,8 @@ rusticl_mesa_bindings_rs = rust.bindgen(
'--allowlist-function', 'mesa_.*',
'--allowlist-var', 'OS_.*',
'--allowlist-function', 'rz?alloc_.*',
'--allowlist-function', 'SHA1.*',
'--allowlist-var', 'SHA1_.*',
'--allowlist-function', 'u_.*',
'--allowlist-function', 'util_format_.*',

View file

@ -18,6 +18,7 @@
#include "util/blob.h"
#include "util/disk_cache.h"
#include "util/os_time.h"
#include "util/sha1/sha1.h"
#include "util/u_printf.h"
#include "util/u_sampler.h"

View file

@ -7,6 +7,18 @@ blob_finish(struct blob *blob)
__blob_finish(blob);
}
bool
disk_cache_get_function_identifier(void *ptr, struct mesa_sha1 *ctx)
{
return __disk_cache_get_function_identifier(ptr, ctx);
}
char *
mesa_bytes_to_hex(char *buf, const uint8_t *hex_id, unsigned size)
{
return __mesa_bytes_to_hex(buf, hex_id, size);
}
nir_function_impl *
nir_shader_get_entrypoint(const nir_shader *shader)
{

View file

@ -1,17 +1,25 @@
#define blob_finish __blob_finish
#define disk_cache_get_function_identifier __disk_cache_get_function_identifier
#define mesa_bytes_to_hex __mesa_bytes_to_hex
#define nir_shader_get_entrypoint __nir_shader_get_entrypoint_wraped
#define pipe_resource_reference __pipe_resource_reference_wraped
#define util_format_pack_rgba __util_format_pack_rgba
#include "nir.h"
#include "util/blob.h"
#include "util/disk_cache.h"
#include "util/hex.h"
#include "util/u_inlines.h"
#include "util/format/u_format.h"
#undef blob_finish
#undef mesa_bytes_to_hex
#undef disk_cache_get_function_identifier
#undef nir_shader_get_entrypoint
#undef pipe_resource_reference
#undef util_format_pack_rgba
void blob_finish(struct blob *);
char *mesa_bytes_to_hex(char *buf, const uint8_t *hex_id, unsigned size);
bool disk_cache_get_function_identifier(void *ptr, struct mesa_sha1 *ctx);
const char* mesa_version_string(void);
nir_function_impl *nir_shader_get_entrypoint(const nir_shader *shader);
void pipe_resource_reference(struct pipe_resource **dst, struct pipe_resource *src);