From d032ede26fcd716ab66fd64d14e6f22b37f15fbf Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 11 Jan 2016 12:39:03 -0800 Subject: [PATCH] nir/types: Add an is_error helper --- 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 86f8508b859..f4408def9a0 100644 --- a/src/glsl/nir/nir_types.cpp +++ b/src/glsl/nir/nir_types.cpp @@ -164,6 +164,12 @@ glsl_type_is_void(const glsl_type *type) return type->is_void(); } +bool +glsl_type_is_error(const glsl_type *type) +{ + return type->is_error(); +} + bool glsl_type_is_vector(const struct glsl_type *type) { diff --git a/src/glsl/nir/nir_types.h b/src/glsl/nir/nir_types.h index 535d36373de..8cb7ec16ce3 100644 --- a/src/glsl/nir/nir_types.h +++ b/src/glsl/nir/nir_types.h @@ -80,6 +80,7 @@ unsigned glsl_get_record_location_offset(const struct glsl_type *type, unsigned length); bool glsl_type_is_void(const struct glsl_type *type); +bool glsl_type_is_error(const struct glsl_type *type); bool glsl_type_is_vector(const struct glsl_type *type); bool glsl_type_is_scalar(const struct glsl_type *type); bool glsl_type_is_vector_or_scalar(const struct glsl_type *type); -- 2.30.2