Mesa (master): nir: add more helpers to nir_types.cpp

Timothy Arceri tarceri at kemper.freedesktop.org
Thu Nov 10 22:25:21 UTC 2016


Module: Mesa
Branch: master
Commit: cd52b4fb161bf038b5279144c7f6d8d84729a940
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd52b4fb161bf038b5279144c7f6d8d84729a940

Author: Timothy Arceri <timothy.arceri at collabora.com>
Date:   Tue Oct 25 17:04:31 2016 +1100

nir: add more helpers to nir_types.cpp

These new helpers will be used in nir_gather_info.c in a following patch.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/compiler/nir_types.cpp | 18 ++++++++++++++++++
 src/compiler/nir_types.h   |  3 +++
 2 files changed, 21 insertions(+)

diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index d145813..5b04e18 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -216,6 +216,24 @@ glsl_sampler_type_is_array(const struct glsl_type *type)
    return type->sampler_array;
 }
 
+bool
+glsl_type_is_dual_slot(const struct glsl_type *type)
+{
+   return type->is_dual_slot();
+}
+
+bool
+glsl_type_is_numeric(const struct glsl_type *type)
+{
+   return type->is_numeric();
+}
+
+bool
+glsl_type_is_boolean(const struct glsl_type *type)
+{
+   return type->is_boolean();
+}
+
 const glsl_type *
 glsl_void_type(void)
 {
diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
index 854d64f..57f4708 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -111,6 +111,9 @@ bool glsl_type_is_array(const struct glsl_type *type);
 bool glsl_type_is_struct(const struct glsl_type *type);
 bool glsl_type_is_sampler(const struct glsl_type *type);
 bool glsl_type_is_image(const struct glsl_type *type);
+bool glsl_type_is_dual_slot(const struct glsl_type *type);
+bool glsl_type_is_numeric(const struct glsl_type *type);
+bool glsl_type_is_boolean(const struct glsl_type *type);
 bool glsl_sampler_type_is_shadow(const struct glsl_type *type);
 bool glsl_sampler_type_is_array(const struct glsl_type *type);
 




More information about the mesa-commit mailing list