Commit 55482a11 by Geoff Lang Committed by Commit Bot

Don't require npot extensions in ES3 contexts.

BUG=angleproject:1468 Change-Id: I106f765e59b18de0659c85f31ce3fbac8016de95 Reviewed-on: https://chromium-review.googlesource.com/413329Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 907e4a61
...@@ -4240,12 +4240,11 @@ bool ValidateGenerateMipmap(Context *context, GLenum target) ...@@ -4240,12 +4240,11 @@ bool ValidateGenerateMipmap(Context *context, GLenum target)
} }
// Non-power of 2 ES2 check // Non-power of 2 ES2 check
if (!context->getExtensions().textureNPOT && if (context->getClientVersion() < Version(3, 0) && !context->getExtensions().textureNPOT &&
(!isPow2(static_cast<int>(texture->getWidth(baseTarget, 0))) || (!isPow2(static_cast<int>(texture->getWidth(baseTarget, 0))) ||
!isPow2(static_cast<int>(texture->getHeight(baseTarget, 0))))) !isPow2(static_cast<int>(texture->getHeight(baseTarget, 0)))))
{ {
ASSERT(context->getClientMajorVersion() <= 2 && ASSERT(target == GL_TEXTURE_2D || target == GL_TEXTURE_CUBE_MAP);
(target == GL_TEXTURE_2D || target == GL_TEXTURE_CUBE_MAP));
context->handleError(Error(GL_INVALID_OPERATION)); context->handleError(Error(GL_INVALID_OPERATION));
return false; return false;
} }
......
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