Commit a4d13323 by Geoff Lang Committed by Shannon Woods

Fixed a bug where ES3 was validating the texture size in non-CopySubImage calls.

TRAC #23276 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Geoff Lang
parent 0d56c430
...@@ -1189,17 +1189,20 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin ...@@ -1189,17 +1189,20 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
} }
} }
if (xoffset + width > textureLevelWidth || if (isSubImage)
yoffset + height > textureLevelHeight ||
zoffset >= textureLevelDepth)
{ {
return gl::error(GL_INVALID_VALUE, false); if (xoffset + width > textureLevelWidth ||
} yoffset + height > textureLevelHeight ||
zoffset >= textureLevelDepth)
{
return gl::error(GL_INVALID_VALUE, false);
}
if (!gl::IsValidCopyTexImageCombination(textureInternalFormat, colorbufferInternalFormat, if (!gl::IsValidCopyTexImageCombination(textureInternalFormat, colorbufferInternalFormat,
context->getClientVersion())) context->getClientVersion()))
{ {
return gl::error(GL_INVALID_OPERATION, false); return gl::error(GL_INVALID_OPERATION, false);
}
} }
return true; return true;
......
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