clover: Remove usage of glsl_type C++ helpers

Preparation for removing the C++ helpers from glsl_type.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26671>
This commit is contained in:
Caio Oliveira 2023-12-13 10:28:16 -08:00 committed by Marge Bot
parent a4947f7bd8
commit 6a4156f812

View file

@ -74,12 +74,12 @@ static void debug_function(void *private_data,
static void static void
clover_arg_size_align(const glsl_type *type, unsigned *size, unsigned *align) clover_arg_size_align(const glsl_type *type, unsigned *size, unsigned *align)
{ {
if (type == glsl_type::sampler_type || type->is_image()) { if (glsl_type_is_sampler(type) || glsl_type_is_image(type)) {
*size = 0; *size = 0;
*align = 1; *align = 1;
} else { } else {
*size = type->cl_size(); *size = glsl_get_cl_size(type);
*align = type->cl_alignment(); *align = glsl_get_cl_alignment(type);
} }
} }
@ -264,9 +264,9 @@ nir_shader *clover::nir::load_libclc_nir(const device &dev, std::string &r_log)
static bool static bool
can_remove_var(nir_variable *var, void *data) can_remove_var(nir_variable *var, void *data)
{ {
return !(var->type->is_sampler() || return !(glsl_type_is_sampler(var->type) ||
var->type->is_texture() || glsl_type_is_texture(var->type) ||
var->type->is_image()); glsl_type_is_image(var->type));
} }
binary clover::nir::spirv_to_nir(const binary &mod, const device &dev, binary clover::nir::spirv_to_nir(const binary &mod, const device &dev,