nir/types: Add a scalar type constructor
This commit is contained in:
@@ -184,6 +184,12 @@ glsl_vec4_type(void)
|
||||
return glsl_type::vec4_type;
|
||||
}
|
||||
|
||||
const glsl_type *
|
||||
glsl_scalar_type(enum glsl_base_type base_type)
|
||||
{
|
||||
return glsl_type::get_instance(base_type, 1, 1);
|
||||
}
|
||||
|
||||
const glsl_type *
|
||||
glsl_vector_type(enum glsl_base_type base_type, unsigned components)
|
||||
{
|
||||
|
||||
@@ -81,6 +81,7 @@ const struct glsl_type *glsl_uint_type(void);
|
||||
const struct glsl_type *glsl_bool_type(void);
|
||||
|
||||
const struct glsl_type *glsl_vec4_type(void);
|
||||
const struct glsl_type *glsl_scalar_type(enum glsl_base_type base_type);
|
||||
const struct glsl_type *glsl_vector_type(enum glsl_base_type base_type,
|
||||
unsigned components);
|
||||
const struct glsl_type *glsl_matrix_type(enum glsl_base_type base_type,
|
||||
|
||||
Reference in New Issue
Block a user