nir/remove_dead_variables: Properly handle deref casts
[mesa.git] / src / compiler / nir_types.h
index fe34cb9583742951f772f7b6e7509e2d8d20cb67..d17671b940000a8ff7ba0f79662cd9569dce396f 100644 (file)
@@ -46,11 +46,14 @@ const char *glsl_get_type_name(const struct glsl_type *type);
 const struct glsl_type *glsl_get_struct_field(const struct glsl_type *type,
                                               unsigned index);
 
+const int glsl_get_struct_field_offset(const struct glsl_type *type,
+                                       unsigned index);
+
+const unsigned glsl_get_explicit_stride(const struct glsl_type *type);
 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_without_array_or_matrix(const struct glsl_type *type);
-const struct glsl_type *glsl_get_array_instance(const struct glsl_type *type,
-                                                unsigned array_size);
+const struct glsl_type *glsl_get_bare_type(const struct glsl_type *type);
 
 const struct glsl_type *glsl_get_column_type(const struct glsl_type *type);
 
@@ -135,6 +138,7 @@ bool glsl_type_is_vector(const struct glsl_type *type);
 bool glsl_type_is_scalar(const struct glsl_type *type);
 bool glsl_type_is_vector_or_scalar(const struct glsl_type *type);
 bool glsl_type_is_matrix(const struct glsl_type *type);
+bool glsl_matrix_type_is_row_major(const struct glsl_type *type);
 bool glsl_type_is_array(const struct glsl_type *type);
 bool glsl_type_is_array_of_arrays(const struct glsl_type *type);
 bool glsl_type_is_array_or_matrix(const struct glsl_type *type);
@@ -172,8 +176,14 @@ 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,
                                          unsigned rows, unsigned columns);
+const struct glsl_type *glsl_explicit_matrix_type(const struct glsl_type *mat,
+                                                  unsigned stride,
+                                                  bool row_major);
+
 const struct glsl_type *glsl_array_type(const struct glsl_type *base,
-                                        unsigned elements);
+                                        unsigned elements,
+                                        unsigned explicit_stride);
+
 const struct glsl_type *glsl_struct_type(const struct glsl_struct_field *fields,
                                          unsigned num_fields, const char *name);
 const struct glsl_type *glsl_interface_type(const struct glsl_struct_field *fields,