Mesa (master): glsl: rename has_implicit_uint_to_int_conversion to *_int_to_uint_*

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue May 5 08:45:41 UTC 2020


Module: Mesa
Branch: master
Commit: 8059f206da88a7a2147c66b3057d60d775cbbfce
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8059f206da88a7a2147c66b3057d60d775cbbfce

Author: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
Date:   Mon May  4 17:49:26 2020 +0300

glsl: rename has_implicit_uint_to_int_conversion to *_int_to_uint_*

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 at globallogic.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4884>

---

 src/compiler/glsl/ast_to_hir.cpp       | 2 +-
 src/compiler/glsl/glsl_parser_extras.h | 2 +-
 src/compiler/glsl_types.cpp            | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

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;
 



More information about the mesa-commit mailing list