Commit 61b54433 by Jamie Madill

Fix unsized formats in GenerateMipmap.

We had accidentally blocked mipmap generation for all unsized formats in ES3, because they were marked as non-renderable. The spec specifically allows for mipmaps with unsized formats in GenerateMipmap. BUG=angle:550 Change-Id: Iee7eddd011f4fe86b690422723620593f8049ba6 Reviewed-on: https://chromium-review.googlesource.com/186971Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 5c55caf3
......@@ -2129,10 +2129,14 @@ void __stdcall glGenerateMipmap(GLenum target)
// Internally, all texture formats are sized so checking if the format
// is color renderable and filterable will not fail.
bool validRenderable = (gl::IsColorRenderingSupported(internalFormat, context) ||
gl::IsSizedInternalFormat(internalFormat, context->getClientVersion()));
if (gl::IsDepthRenderingSupported(internalFormat, context) ||
gl::IsFormatCompressed(internalFormat, context->getClientVersion()) ||
!gl::IsColorRenderingSupported(internalFormat, context) ||
!gl::IsTextureFilteringSupported(internalFormat, context))
!gl::IsTextureFilteringSupported(internalFormat, context) ||
!validRenderable)
{
return gl::error(GL_INVALID_OPERATION);
}
......
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