[Mesa-dev] [PATCH 5/8] Enable usage of blend_func_extended blend factors

Ilia Mirkin imirkin at alum.mit.edu
Thu Nov 5 09:32:40 PST 2015


On Thu, Nov 5, 2015 at 12:16 PM, Ryan Houdek <sonicadvance1 at gmail.com> wrote:
> ---
>  src/mesa/main/blend.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
> index 20aa498..8da81ee 100644
> --- a/src/mesa/main/blend.c
> +++ b/src/mesa/main/blend.c
> @@ -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 (_mesa_is_desktop_gl(ctx) || ctx->API == API_OPENGLES2)

indent

also, at your option, ctx->API != API_OPENGLES. Either way is fine by me.

>           && ctx->Extensions.ARB_blend_func_extended;
>     default:
>        return GL_FALSE;
> @@ -107,7 +107,7 @@ legal_dst_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 (_mesa_is_desktop_gl(ctx) || ctx->API == API_OPENGLES2)
>           && ctx->Extensions.ARB_blend_func_extended;
>     default:
>        return GL_FALSE;
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list