summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/nir')
-rw-r--r--src/glsl/nir/nir_types.cpp14
-rw-r--r--src/glsl/nir/nir_types.h3
2 files changed, 16 insertions, 1 deletions
diff --git a/src/glsl/nir/nir_types.cpp b/src/glsl/nir/nir_types.cpp
index fe0001592d1..a13c3e12a86 100644
--- a/src/glsl/nir/nir_types.cpp
+++ b/src/glsl/nir/nir_types.cpp
@@ -136,8 +136,20 @@ glsl_type_is_matrix(const struct glsl_type *type)
return type->is_matrix();
}
-const glsl_type*
+const glsl_type *
glsl_void_type(void)
{
return glsl_type::void_type;
}
+
+const glsl_type *
+glsl_vec4_type(void)
+{
+ return glsl_type::vec4_type;
+}
+
+const glsl_type *
+glsl_array_type(const glsl_type *base, unsigned elements)
+{
+ return glsl_type::get_array_instance(base, elements);
+}
diff --git a/src/glsl/nir/nir_types.h b/src/glsl/nir/nir_types.h
index 6f91e2dce8d..494051a6755 100644
--- a/src/glsl/nir/nir_types.h
+++ b/src/glsl/nir/nir_types.h
@@ -69,6 +69,9 @@ bool glsl_type_is_scalar(const struct glsl_type *type);
bool glsl_type_is_matrix(const struct glsl_type *type);
const struct glsl_type *glsl_void_type(void);
+const struct glsl_type *glsl_vec4_type(void);
+const struct glsl_type *glsl_array_type(const struct glsl_type *base,
+ unsigned elements);
#ifdef __cplusplus
}