mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
nir/types: Add a wrapper for coordinate_components
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
f2d0a2b110
commit
b217705dec
2 changed files with 8 additions and 0 deletions
|
|
@ -172,6 +172,13 @@ glsl_get_sampler_target(const struct glsl_type *type)
|
|||
return type->sampler_index();
|
||||
}
|
||||
|
||||
int
|
||||
glsl_get_sampler_coordinate_components(const struct glsl_type *type)
|
||||
{
|
||||
assert(glsl_type_is_sampler(type) || glsl_type_is_image(type));
|
||||
return type->coordinate_components();
|
||||
}
|
||||
|
||||
unsigned
|
||||
glsl_get_record_location_offset(const struct glsl_type *type,
|
||||
unsigned length)
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ const char *glsl_get_struct_elem_name(const struct glsl_type *type,
|
|||
enum glsl_sampler_dim glsl_get_sampler_dim(const struct glsl_type *type);
|
||||
enum glsl_base_type glsl_get_sampler_result_type(const struct glsl_type *type);
|
||||
unsigned glsl_get_sampler_target(const struct glsl_type *type);
|
||||
int glsl_get_sampler_coordinate_components(const struct glsl_type *type);
|
||||
|
||||
unsigned glsl_get_record_location_offset(const struct glsl_type *type,
|
||||
unsigned length);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue