diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 1201c11b778..630d807e114 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -250,7 +250,7 @@ get_implicit_conversion_operation(const glsl_type *to, const glsl_type *from, } case GLSL_TYPE_UINT: - if (!state->has_implicit_uint_to_int_conversion()) + if (!state->has_implicit_int_to_uint_conversion()) return (ir_expression_operation)0; switch (from->base_type) { case GLSL_TYPE_INT: return ir_unop_i2u; diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h index afbc09170bf..49e1f1e2a51 100644 --- a/src/compiler/glsl/glsl_parser_extras.h +++ b/src/compiler/glsl/glsl_parser_extras.h @@ -359,7 +359,7 @@ struct _mesa_glsl_parse_state { return EXT_shader_implicit_conversions_enable || is_version(120, 0); } - bool has_implicit_uint_to_int_conversion() const + bool has_implicit_int_to_uint_conversion() const { return ARB_gpu_shader5_enable || MESA_shader_integer_functions_enable || diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index 445659599c2..71a149e4722 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -1667,7 +1667,7 @@ glsl_type::can_implicitly_convert_to(const glsl_type *desired, * state-dependent checks have already happened though, so allow anything * that's allowed in any shader version. */ - if ((!state || state->has_implicit_uint_to_int_conversion()) && + if ((!state || state->has_implicit_int_to_uint_conversion()) && desired->base_type == GLSL_TYPE_UINT && this->base_type == GLSL_TYPE_INT) return true;