diff options
author | marha <marha@users.sourceforge.net> | 2012-08-31 15:18:29 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-08-31 15:18:29 +0200 |
commit | 53192e17e55aa9ed3e3721bf4fdcb2b01a595202 (patch) | |
tree | 01d81bc7cfb5dc92584f4b7615d2ac1b09fe5411 /mesalib/src/mesa/main/blend.c | |
parent | 05d67ae9117e5157fd1a5175dde6d7e48caf4653 (diff) | |
download | vcxsrv-53192e17e55aa9ed3e3721bf4fdcb2b01a595202.tar.gz vcxsrv-53192e17e55aa9ed3e3721bf4fdcb2b01a595202.tar.bz2 vcxsrv-53192e17e55aa9ed3e3721bf4fdcb2b01a595202.zip |
randrproto xwininfo fontconfig libxcb mesa xkeyboard-config pixman xserver
git update 31 Aug 2012
Diffstat (limited to 'mesalib/src/mesa/main/blend.c')
-rw-r--r-- | mesalib/src/mesa/main/blend.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/blend.c b/mesalib/src/mesa/main/blend.c index 5bc40a028..de871a92a 100644 --- a/mesalib/src/mesa/main/blend.c +++ b/mesalib/src/mesa/main/blend.c @@ -58,16 +58,18 @@ legal_src_factor(const struct gl_context *ctx, GLenum factor) case GL_DST_ALPHA: case GL_ONE_MINUS_DST_ALPHA: case GL_SRC_ALPHA_SATURATE: + return GL_TRUE; case GL_CONSTANT_COLOR: case GL_ONE_MINUS_CONSTANT_COLOR: case GL_CONSTANT_ALPHA: case GL_ONE_MINUS_CONSTANT_ALPHA: - return GL_TRUE; + return _mesa_is_desktop_gl(ctx) || ctx->API == API_OPENGLES2; case GL_SRC1_COLOR: case GL_SRC1_ALPHA: case GL_ONE_MINUS_SRC1_COLOR: case GL_ONE_MINUS_SRC1_ALPHA: - return ctx->Extensions.ARB_blend_func_extended; + return _mesa_is_desktop_gl(ctx) + && ctx->Extensions.ARB_blend_func_extended; default: return GL_FALSE; } @@ -93,17 +95,22 @@ legal_dst_factor(const struct gl_context *ctx, GLenum factor) case GL_ONE_MINUS_SRC_ALPHA: case GL_DST_ALPHA: case GL_ONE_MINUS_DST_ALPHA: + return GL_TRUE; case GL_CONSTANT_COLOR: case GL_ONE_MINUS_CONSTANT_COLOR: case GL_CONSTANT_ALPHA: case GL_ONE_MINUS_CONSTANT_ALPHA: - return GL_TRUE; + return _mesa_is_desktop_gl(ctx) || ctx->API == API_OPENGLES2; case GL_SRC_ALPHA_SATURATE: + return (_mesa_is_desktop_gl(ctx) + && 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 ctx->Extensions.ARB_blend_func_extended; + return _mesa_is_desktop_gl(ctx) + && ctx->Extensions.ARB_blend_func_extended; default: return GL_FALSE; } |