Mesa (master): glsl: remove redundant es_shader checks

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Oct 11 03:45:57 UTC 2018


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

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Thu Oct 11 11:25:08 2018 +1100

glsl: remove redundant es_shader checks

The es check is already covered by the is_version() check.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/compiler/glsl/ast_to_hir.cpp | 4 ----
 src/compiler/glsl_types.cpp      | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 1082d6c91c..77fe0afef8 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -314,10 +314,6 @@ apply_implicit_conversion(const glsl_type *to, ir_rvalue * &from,
    if (!state->is_version(120, 0))
       return false;
 
-   /* ESSL does not allow implicit conversions */
-   if (state->es_shader)
-      return false;
-
    /* From page 27 (page 33 of the PDF) of the GLSL 1.50 spec:
     *
     *    "There are no implicit array or structure conversions. For
diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp
index ca5368aa53..70bce6ace8 100644
--- a/src/compiler/glsl_types.cpp
+++ b/src/compiler/glsl_types.cpp
@@ -1425,7 +1425,7 @@ glsl_type::can_implicitly_convert_to(const glsl_type *desired,
     * state, we're doing intra-stage function linking where these checks have
     * already been done.
     */
-   if (state && (state->es_shader || !state->is_version(120, 0)))
+   if (state && !state->is_version(120, 0))
       return false;
 
    /* There is no conversion among matrix types. */




More information about the mesa-commit mailing list