glsl: rename has_implicit_uint_to_int_conversion to *_int_to_uint_*
authorDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Mon, 4 May 2020 14:49:26 +0000 (17:49 +0300)
committerMarge Bot <eric+marge@anholt.net>
Tue, 5 May 2020 08:18:14 +0000 (08:18 +0000)
There is no uint to int implicit conversion in glsl, this is just
a typo in the name of this function. The correct one would be:
has_implicit_int_to_uint_conversion.

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4884>

src/compiler/glsl/ast_to_hir.cpp
src/compiler/glsl/glsl_parser_extras.h
src/compiler/glsl_types.cpp

index 1201c11b77810660e2d24fac26c32b2bd817f280..630d807e1147459f109b520c64e03de9ea91fccc 100644 (file)
@@ -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;
index afbc09170bfa71064038f3d052517cb0114cc20e..49e1f1e2a51bbeb17c1517dd5e586b0efdd17457 100644 (file)
@@ -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 ||
index 445659599c2230dc21e9122b029eefccd4da3b1e..71a149e47227ff707c5d429f3af9c3c7ed268f23 100644 (file)
@@ -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;