aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-11-12 13:24:42 +1100
committerTimothy Arceri <[email protected]>2018-11-12 15:38:56 +1100
commit9dd737bb02923d26d4d947ebf265b05f13dd2c0c (patch)
tree70a8f330f33ed62258f57d8f82be6c8e1fd3a863 /src/compiler
parent552642066f511960c7fa7c0fdf1bf733982fc1c9 (diff)
nir: add glsl_type_is_integer() helper
Fixes: 1c9c42d16b4c ("nir: add varying component packing helpers") Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir_types.cpp5
-rw-r--r--src/compiler/nir_types.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index d24f0941519..3cd61f66056 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -301,6 +301,11 @@ glsl_type_is_boolean(const struct glsl_type *type)
{
return type->is_boolean();
}
+bool
+glsl_type_is_integer(const struct glsl_type *type)
+{
+ return type->is_integer();
+}
const glsl_type *
glsl_void_type(void)
diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
index 77454fa9fab..70d593b96ab 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -142,6 +142,7 @@ 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_type_is_integer(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);
bool glsl_contains_atomic(const struct glsl_type *type);