aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ast_to_hir.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-06-06 11:37:32 -0500
committerJason Ekstrand <[email protected]>2019-06-19 20:28:52 +0000
commitf0920e266c152044cb05892f3aea5a17a163cc02 (patch)
treec713093793366ea4cc4681c8a1aac539822facdf /src/compiler/glsl/ast_to_hir.cpp
parent21a7e6d569700812cdd127551a6f8ce24cf6201a (diff)
glsl/types: Rename is_integer to is_integer_32
It only accepts 32-bit integers so it should have a more descriptive name. This patch should not be a functional change. Reviewed-by: Karol Herbst <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ast_to_hir.cpp')
-rw-r--r--src/compiler/glsl/ast_to_hir.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 26f72fc0925..9cd67ab7885 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -747,7 +747,7 @@ shift_result_type(const struct glsl_type *type_a,
return glsl_type::error_type;
}
- if (!type_b->is_integer()) {
+ if (!type_b->is_integer_32()) {
_mesa_glsl_error(loc, state, "RHS of operator %s must be an integer or "
"integer vector", ast_expression::operator_string(op));
return glsl_type::error_type;
@@ -2289,7 +2289,7 @@ process_array_size(exec_node *node,
return 0;
}
- if (!ir->type->is_integer()) {
+ if (!ir->type->is_integer_32()) {
_mesa_glsl_error(& loc, state,
"array size must be integer type");
return 0;
@@ -2389,7 +2389,7 @@ precision_qualifier_allowed(const glsl_type *type)
*/
const glsl_type *const t = type->without_array();
- return (t->is_float() || t->is_integer() || t->contains_opaque()) &&
+ return (t->is_float() || t->is_integer_32() || t->contains_opaque()) &&
!t->is_struct();
}
@@ -6502,7 +6502,7 @@ ast_switch_statement::hir(exec_list *instructions,
* scalar integer."
*/
if (!test_expression->type->is_scalar() ||
- !test_expression->type->is_integer()) {
+ !test_expression->type->is_integer_32()) {
YYLTYPE loc = this->test_expression->get_location();
_mesa_glsl_error(& loc,
@@ -6821,7 +6821,7 @@ ast_case_label::hir(exec_list *instructions,
glsl_type::int_type->can_implicitly_convert_to(glsl_type::uint_type,
state);
- if ((!type_a->is_integer() || !type_b->is_integer()) ||
+ if ((!type_a->is_integer_32() || !type_b->is_integer_32()) ||
!integer_conversion_supported) {
_mesa_glsl_error(&loc, state, "type mismatch with switch "
"init-expression and case label (%s != %s)",