Commit c0094eca by Geoff Lang Committed by Commit Bot

Validate the combination of type and internal format for CopyTextureCHROMIUM.

Sized internal formats with invalid types would pass validation because GetInternalFormatInfo does not validate that the type is a valid upload type for the given internal format. TEST=conformance2/textures/misc/tex-image-with-bad-args-from-dom-elements.html BUG=angleproject:1932 Change-Id: I07fd542630a4508383263c1fe3d7a80c037d7ca0 Reviewed-on: https://chromium-review.googlesource.com/617508 Commit-Queue: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 200e2d23
......@@ -290,6 +290,13 @@ bool IsValidCopyTextureDestinationFormatType(Context *context, GLint internalFor
return false;
}
if (!ValidES3FormatCombination(GetUnsizedFormat(internalFormat), type, internalFormat))
{
context->handleError(InvalidOperation()
<< "Invalid combination of type and internalFormat.");
return false;
}
const InternalFormat &internalFormatInfo = GetInternalFormatInfo(internalFormat, type);
if (!internalFormatInfo.textureSupport(context->getClientVersion(), context->getExtensions()))
{
......
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