Commit d151b459 by Alexis Hetu Committed by Commit Bot

Blendable check

- Added a blendable check to InternalFormat - Set the blendable check to the same as the Renderbuffer check for most formats, except true integer formats and 32F formats - True integer formats never support blending - 32F formats support blending based on the GL_EXT_float_blend Bug: angleproject:4291 Change-Id: Icffdd3e6d8791303bdfdad9ec01cfd9a1d511af0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1999495Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
parent 441b72f0
...@@ -71,6 +71,7 @@ TextureCaps GenerateMinimumTextureCaps(GLenum sizedInternalFormat, ...@@ -71,6 +71,7 @@ TextureCaps GenerateMinimumTextureCaps(GLenum sizedInternalFormat,
caps.filterable = internalFormatInfo.filterSupport(clientVersion, extensions); caps.filterable = internalFormatInfo.filterSupport(clientVersion, extensions);
caps.textureAttachment = internalFormatInfo.textureAttachmentSupport(clientVersion, extensions); caps.textureAttachment = internalFormatInfo.textureAttachmentSupport(clientVersion, extensions);
caps.renderbuffer = internalFormatInfo.renderbufferSupport(clientVersion, extensions); caps.renderbuffer = internalFormatInfo.renderbufferSupport(clientVersion, extensions);
caps.blendable = internalFormatInfo.blendSupport(clientVersion, extensions);
caps.sampleCounts.insert(0); caps.sampleCounts.insert(0);
if (internalFormatInfo.isRequiredRenderbufferFormat(clientVersion)) if (internalFormatInfo.isRequiredRenderbufferFormat(clientVersion))
......
...@@ -3681,6 +3681,8 @@ void Context::updateCaps() ...@@ -3681,6 +3681,8 @@ void Context::updateCaps()
formatCaps.renderbuffer = formatCaps.renderbuffer =
formatCaps.renderbuffer && formatCaps.renderbuffer &&
formatInfo.renderbufferSupport(getClientVersion(), mState.mExtensions); formatInfo.renderbufferSupport(getClientVersion(), mState.mExtensions);
formatCaps.blendable =
formatCaps.blendable && formatInfo.blendSupport(getClientVersion(), mState.mExtensions);
// OpenGL ES does not support multisampling with non-rendererable formats // OpenGL ES does not support multisampling with non-rendererable formats
// OpenGL ES 3.0 or prior does not support multisampling with integer formats // OpenGL ES 3.0 or prior does not support multisampling with integer formats
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -224,6 +224,7 @@ struct InternalFormat ...@@ -224,6 +224,7 @@ struct InternalFormat
SupportCheckFunction filterSupport; SupportCheckFunction filterSupport;
SupportCheckFunction textureAttachmentSupport; // glFramebufferTexture2D SupportCheckFunction textureAttachmentSupport; // glFramebufferTexture2D
SupportCheckFunction renderbufferSupport; // glFramebufferRenderbuffer SupportCheckFunction renderbufferSupport; // glFramebufferRenderbuffer
SupportCheckFunction blendSupport;
}; };
// A "Format" wraps an InternalFormat struct, querying it from either a sized internal format or // A "Format" wraps an InternalFormat struct, querying it from either a sized internal format or
......
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