Merge remote-tracking branch 'mesa-public/master' into vulkan
[mesa.git] / src / compiler / glsl / ast_to_hir.cpp
index dfd31966eb0fa19e72b7d9621aa9246a43d366b6..7213ad8ebec42b7fcb60174baee8de7f5a9cf968 100644 (file)
@@ -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)
+      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
@@ -1129,6 +1133,7 @@ do_comparison(void *mem_ctx, int operation, ir_rvalue *op0, ir_rvalue *op1)
    case GLSL_TYPE_SAMPLER:
    case GLSL_TYPE_IMAGE:
    case GLSL_TYPE_INTERFACE:
+   case GLSL_TYPE_FUNCTION:
    case GLSL_TYPE_ATOMIC_UINT:
    case GLSL_TYPE_SUBROUTINE:
       /* I assume a comparison of a struct containing a sampler just