[Mesa-dev] [PATCH 08/18] nir: add glsl_dvec_type() helper

Timothy Arceri timothy.arceri at collabora.com
Wed Jun 15 05:38:40 UTC 2016


---
 src/compiler/nir_types.cpp | 6 ++++++
 src/compiler/nir_types.h   | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index 4ea7a2f..835d53b 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -257,6 +257,12 @@ glsl_vec_type(unsigned n)
 }
 
 const glsl_type *
+glsl_dvec_type(unsigned n)
+{
+   return glsl_type::dvec(n);
+}
+
+const glsl_type *
 glsl_vec4_type(void)
 {
    return glsl_type::vec4_type;
diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
index 7d9917f..f7147a9 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -118,6 +118,7 @@ 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_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);
-- 
2.5.5



More information about the mesa-dev mailing list