[Mesa-dev] [PATCH 09/12] nir/types: Expose the bool type

Jason Ekstrand jason at jlekstrand.net
Sat Dec 26 11:09:32 PST 2015


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

diff --git a/src/glsl/nir/nir_types.cpp b/src/glsl/nir/nir_types.cpp
index 41ac546..4452ee6 100644
--- a/src/glsl/nir/nir_types.cpp
+++ b/src/glsl/nir/nir_types.cpp
@@ -186,6 +186,12 @@ glsl_uint_type(void)
 }
 
 const glsl_type *
+glsl_bool_type(void)
+{
+   return glsl_type::bool_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 64a75f6..7457f6e 100644
--- a/src/glsl/nir/nir_types.h
+++ b/src/glsl/nir/nir_types.h
@@ -78,6 +78,7 @@ const struct glsl_type *glsl_float_type(void);
 const struct glsl_type *glsl_vec_type(unsigned n);
 const struct glsl_type *glsl_vec4_type(void);
 const struct glsl_type *glsl_uint_type(void);
+const struct glsl_type *glsl_bool_type(void);
 const struct glsl_type *glsl_array_type(const struct glsl_type *base,
                                         unsigned elements);
 
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list