X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Fnir_types.h;h=6b4f646b20bdabd64997ab305eff1077f17b7672;hb=249646247996d9950584bbd34067a27b8b704a6f;hp=5efdd85dea5264ee275ff460bdb06511afc5dd21;hpb=6a049687841d87fc5bbd0fb0a192f03776f67630;p=mesa.git diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h index 5efdd85dea5..6b4f646b20b 100644 --- a/src/compiler/nir_types.h +++ b/src/compiler/nir_types.h @@ -47,6 +47,7 @@ const struct glsl_type *glsl_get_struct_field(const struct glsl_type *type, unsigned index); const struct glsl_type *glsl_get_array_element(const struct glsl_type *type); +const struct glsl_type *glsl_without_array(const struct glsl_type *type); const struct glsl_type *glsl_get_column_type(const struct glsl_type *type); @@ -69,7 +70,7 @@ unsigned glsl_get_length(const struct glsl_type *type); unsigned glsl_get_aoa_size(const struct glsl_type *type); unsigned glsl_count_attribute_slots(const struct glsl_type *type, - bool vertex_input_slots); + bool is_vertex_input); const char *glsl_get_struct_elem_name(const struct glsl_type *type, unsigned index); @@ -81,9 +82,9 @@ unsigned glsl_get_record_location_offset(const struct glsl_type *type, unsigned length); static inline unsigned -glsl_get_bit_size(enum glsl_base_type type) +glsl_get_bit_size(const struct glsl_type *type) { - switch (type) { + switch (glsl_get_base_type(type)) { case GLSL_TYPE_INT: case GLSL_TYPE_UINT: case GLSL_TYPE_BOOL: @@ -116,7 +117,9 @@ bool glsl_sampler_type_is_array(const struct glsl_type *type); const struct glsl_type *glsl_void_type(void); const struct glsl_type *glsl_float_type(void); +const struct glsl_type *glsl_double_type(void); const struct glsl_type *glsl_vec_type(unsigned n); +const struct glsl_type *glsl_dvec_type(unsigned n); const struct glsl_type *glsl_vec4_type(void); const struct glsl_type *glsl_int_type(void); const struct glsl_type *glsl_uint_type(void);