rusticl: Add Rust bindings for inline glsl_types functions
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25470>
This commit is contained in:
@@ -54,3 +54,45 @@ mesa_version_string(void)
|
||||
{
|
||||
return PACKAGE_VERSION MESA_GIT_SHA1;
|
||||
}
|
||||
|
||||
bool
|
||||
glsl_type_is_sampler(const struct glsl_type *t)
|
||||
{
|
||||
return __glsl_type_is_sampler(t);
|
||||
}
|
||||
|
||||
bool
|
||||
glsl_type_is_image(const struct glsl_type *t)
|
||||
{
|
||||
return __glsl_type_is_image(t);
|
||||
}
|
||||
|
||||
bool
|
||||
glsl_type_is_texture(const struct glsl_type *t)
|
||||
{
|
||||
return __glsl_type_is_texture(t);
|
||||
}
|
||||
|
||||
const struct glsl_type *
|
||||
glsl_uint_type(void)
|
||||
{
|
||||
return __glsl_uint_type();
|
||||
}
|
||||
|
||||
const struct glsl_type *
|
||||
glsl_uint8_t_type(void)
|
||||
{
|
||||
return __glsl_uint8_t_type();
|
||||
}
|
||||
|
||||
const struct glsl_type *
|
||||
glsl_uint64_t_type(void)
|
||||
{
|
||||
return __glsl_uint64_t_type();
|
||||
}
|
||||
|
||||
const struct glsl_type *
|
||||
glsl_int16_t_type(void)
|
||||
{
|
||||
return __glsl_int16_t_type();
|
||||
}
|
||||
|
||||
@@ -6,12 +6,20 @@
|
||||
#define should_print_nir __should_print_nir
|
||||
#define should_skip_nir __should_skip_nir
|
||||
#define util_format_pack_rgba __util_format_pack_rgba
|
||||
#define glsl_type_is_sampler __glsl_type_is_sampler
|
||||
#define glsl_type_is_image __glsl_type_is_image
|
||||
#define glsl_type_is_texture __glsl_type_is_texture
|
||||
#define glsl_uint_type __glsl_uint_type
|
||||
#define glsl_uint8_t_type __glsl_uint8_t_type
|
||||
#define glsl_uint64_t_type __glsl_uint64_t_type
|
||||
#define glsl_int16_t_type __glsl_int16_t_type
|
||||
#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"
|
||||
#include "compiler/glsl_types.h"
|
||||
#undef blob_finish
|
||||
#undef mesa_bytes_to_hex
|
||||
#undef disk_cache_get_function_identifier
|
||||
@@ -20,6 +28,13 @@
|
||||
#undef should_print_nir
|
||||
#undef should_skip_nir
|
||||
#undef util_format_pack_rgba
|
||||
#undef glsl_type_is_sampler
|
||||
#undef glsl_type_is_image
|
||||
#undef glsl_type_is_texture
|
||||
#undef glsl_uint_type
|
||||
#undef glsl_uint8_t_type
|
||||
#undef glsl_uint64_t_type
|
||||
#undef glsl_int16_t_type
|
||||
|
||||
void blob_finish(struct blob *);
|
||||
char *mesa_bytes_to_hex(char *buf, const uint8_t *hex_id, unsigned size);
|
||||
@@ -30,3 +45,10 @@ void pipe_resource_reference(struct pipe_resource **dst, struct pipe_resource *s
|
||||
bool should_skip_nir(const char *);
|
||||
bool should_print_nir(nir_shader *);
|
||||
void util_format_pack_rgba(enum pipe_format format, void *dst, const void *src, unsigned w);
|
||||
bool glsl_type_is_sampler(const struct glsl_type *t);
|
||||
bool glsl_type_is_image(const struct glsl_type *t);
|
||||
bool glsl_type_is_texture(const struct glsl_type *t);
|
||||
const struct glsl_type *glsl_uint_type(void);
|
||||
const struct glsl_type *glsl_uint8_t_type(void);
|
||||
const struct glsl_type *glsl_uint64_t_type(void);
|
||||
const struct glsl_type *glsl_int16_t_type(void);
|
||||
|
||||
Reference in New Issue
Block a user