mesa: enable usage of blend_func_extended blend factors in GLES2
authorRyan Houdek <Sonicadvance1@gmail.com>
Thu, 5 Nov 2015 17:05:17 +0000 (11:05 -0600)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 19 Nov 2015 16:39:51 +0000 (11:39 -0500)
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/mesa/main/blend.c

index ddf7f497f1e1cc08a752bfe4285a2a59257472c6..f07552b47789adf304df2c5c11d762a0c4369968 100644 (file)
@@ -67,7 +67,7 @@ legal_src_factor(const struct gl_context *ctx, GLenum factor)
    case GL_SRC1_ALPHA:
    case GL_ONE_MINUS_SRC1_COLOR:
    case GL_ONE_MINUS_SRC1_ALPHA:
-      return _mesa_is_desktop_gl(ctx)
+      return ctx->API != API_OPENGLES
          && ctx->Extensions.ARB_blend_func_extended;
    default:
       return GL_FALSE;
@@ -100,14 +100,14 @@ legal_dst_factor(const struct gl_context *ctx, GLenum factor)
    case GL_ONE_MINUS_CONSTANT_ALPHA:
       return _mesa_is_desktop_gl(ctx) || ctx->API == API_OPENGLES2;
    case GL_SRC_ALPHA_SATURATE:
-      return (_mesa_is_desktop_gl(ctx)
+      return (ctx->API != API_OPENGLES
               && ctx->Extensions.ARB_blend_func_extended)
          || _mesa_is_gles3(ctx);
    case GL_SRC1_COLOR:
    case GL_SRC1_ALPHA:
    case GL_ONE_MINUS_SRC1_COLOR:
    case GL_ONE_MINUS_SRC1_ALPHA:
-      return _mesa_is_desktop_gl(ctx)
+      return ctx->API != API_OPENGLES
          && ctx->Extensions.ARB_blend_func_extended;
    default:
       return GL_FALSE;