summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/glsl/nir/nir_types.cpp7
-rw-r--r--src/glsl/nir/nir_types.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_types.cpp b/src/glsl/nir/nir_types.cpp
index 940c676005a..da9807f0e62 100644
--- a/src/glsl/nir/nir_types.cpp
+++ b/src/glsl/nir/nir_types.cpp
@@ -112,6 +112,13 @@ glsl_get_struct_elem_name(const struct glsl_type *type, unsigned index)
return type->fields.structure[index].name;
}
+unsigned
+glsl_get_record_location_offset(const struct glsl_type *type,
+ unsigned length)
+{
+ return type->record_location_offset(length);
+}
+
bool
glsl_type_is_void(const glsl_type *type)
{
diff --git a/src/glsl/nir/nir_types.h b/src/glsl/nir/nir_types.h
index bf2faf496c4..49d6a65e7c4 100644
--- a/src/glsl/nir/nir_types.h
+++ b/src/glsl/nir/nir_types.h
@@ -62,6 +62,8 @@ unsigned glsl_get_length(const struct glsl_type *type);
const char *glsl_get_struct_elem_name(const struct glsl_type *type,
unsigned index);
+unsigned glsl_get_record_location_offset(const struct glsl_type *type,
+ unsigned length);
bool glsl_type_is_void(const struct glsl_type *type);
bool glsl_type_is_vector(const struct glsl_type *type);