summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-10-25 17:04:31 +1100
committerTimothy Arceri <[email protected]>2016-11-11 09:17:07 +1100
commitcd52b4fb161bf038b5279144c7f6d8d84729a940 (patch)
tree6c945da99c5e93f0286acddfd7aae6ed60ff8f79 /src/compiler
parentad9d4a4f8d57725305ab767551bf6a89b69c11e1 (diff)
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 <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir_types.cpp18
-rw-r--r--src/compiler/nir_types.h3
2 files changed, 21 insertions, 0 deletions
diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index d1458134c0a..5b04e181e4c 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 854d64fd875..57f4708b67a 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);