Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu> --- Just discovered we were allowing these after a discussion with Ryan Houdek. No clue how many piglits this will break though...
src/compiler/glsl/ast_to_hir.cpp | 4 ++++ src/compiler/glsl_types.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index dfd3196..af12e77 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -291,6 +291,10 @@ 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 /* && !state->EXT_shader_implicit_conversions_enabled */) + 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 17ebf07..16efa1e 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -1139,6 +1139,10 @@ glsl_type::can_implicitly_convert_to(const glsl_type *desired, if (this == desired) return true; + /* ESSL does not allow implicit conversions */ + if (state->es_shader /* && !state->EXT_shader_implicit_conversions_enabled */) + return false; + /* There is no conversion among matrix types. */ if (this->matrix_columns > 1 || desired->matrix_columns > 1) return false; -- 2.4.10 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev