Commit ae799b19 by Nicolas Capens

Implement GL_EXT_blend_minmax support

BUG=14852910 Change-Id: I0ade7db0284370d91fbb3c35c8ca6ed040bdba1e
parent 499b440c
......@@ -497,7 +497,6 @@ void Context::setPolygonOffsetFill(bool enabled)
bool Context::isPolygonOffsetFillEnabled() const
{
return mState.polygonOffsetFill;
}
void Context::setPolygonOffsetParams(GLfloat factor, GLfloat units)
......@@ -2743,9 +2742,10 @@ void Context::initExtensionString()
mExtensionString += "GL_OES_texture_half_float ";
mExtensionString += "GL_OES_texture_half_float_linear ";
mExtensionString += "GL_OES_texture_npot ";
mExtensionString += "GL_EXT_blend_minmax ";
mExtensionString += "GL_EXT_occlusion_query_boolean ";
mExtensionString += "GL_EXT_read_format_bgra ";
if(S3TC_SUPPORT)
{
mExtensionString += "GL_EXT_texture_compression_dxt1 ";
......
......@@ -425,21 +425,25 @@ void GL_APIENTRY glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
{
switch(modeRGB)
{
case GL_FUNC_ADD:
case GL_FUNC_SUBTRACT:
case GL_FUNC_REVERSE_SUBTRACT:
case GL_FUNC_ADD:
case GL_FUNC_SUBTRACT:
case GL_FUNC_REVERSE_SUBTRACT:
case GL_MIN_EXT:
case GL_MAX_EXT:
break;
default:
default:
return error(GL_INVALID_ENUM);
}
switch(modeAlpha)
{
case GL_FUNC_ADD:
case GL_FUNC_SUBTRACT:
case GL_FUNC_REVERSE_SUBTRACT:
case GL_FUNC_ADD:
case GL_FUNC_SUBTRACT:
case GL_FUNC_REVERSE_SUBTRACT:
case GL_MIN_EXT:
case GL_MAX_EXT:
break;
default:
default:
return error(GL_INVALID_ENUM);
}
......
......@@ -512,6 +512,8 @@ namespace es2sw
case GL_FUNC_ADD: return sw::Context::BLENDOP_ADD;
case GL_FUNC_SUBTRACT: return sw::Context::BLENDOP_SUB;
case GL_FUNC_REVERSE_SUBTRACT: return sw::Context::BLENDOP_INVSUB;
case GL_MIN_EXT: return sw::Context::BLENDOP_MIN;
case GL_MAX_EXT: return sw::Context::BLENDOP_MAX;
default: UNREACHABLE();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment