From a6d653dcbbee3158f9ea7b284bdeb1a8432f0fcb Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 26 Mar 2010 14:40:37 -0700 Subject: [PATCH] Replace remaining uses of is_numeric_base_type with glsl_type::is_numeric --- ast_to_hir.cpp | 6 +++--- glsl_types.h | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp index 890dc8e465c..a41bae68933 100644 --- a/ast_to_hir.cpp +++ b/ast_to_hir.cpp @@ -239,7 +239,7 @@ unary_arithmetic_result_type(const struct glsl_type *type) * component-wise on their operands. These result with the same type * they operated on." */ - if (!is_numeric_base_type(type->base_type)) + if (!type->is_numeric()) return glsl_type::error_type; return type; @@ -289,8 +289,8 @@ relational_result_type(const struct glsl_type *type_a, * than or equal (>=), and less than or equal (<=) operate only on * scalar integer and scalar floating-point expressions." */ - if (! is_numeric_base_type(type_a->base_type) - || ! is_numeric_base_type(type_b->base_type) + if (!type_a->is_numeric() + || !type_b->is_numeric() || !type_a->is_scalar() || !type_b->is_scalar()) return glsl_type::error_type; diff --git a/glsl_types.h b/glsl_types.h index 9af8e9d3f8a..64c6cef669e 100644 --- a/glsl_types.h +++ b/glsl_types.h @@ -39,9 +39,6 @@ #define GLSL_TYPE_VOID 8 #define GLSL_TYPE_ERROR 9 -#define is_numeric_base_type(b) \ - (((b) >= GLSL_TYPE_UINT) && ((b) <= GLSL_TYPE_FLOAT)) - #define is_error_type(t) ((t)->base_type == GLSL_TYPE_ERROR) enum glsl_sampler_dim { -- 2.30.2