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,6 +1189,8 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin ...@@ -1189,6 +1189,8 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
} }
} }
if (isSubImage)
{
if (xoffset + width > textureLevelWidth || if (xoffset + width > textureLevelWidth ||
yoffset + height > textureLevelHeight || yoffset + height > textureLevelHeight ||
zoffset >= textureLevelDepth) zoffset >= textureLevelDepth)
...@@ -1201,6 +1203,7 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin ...@@ -1201,6 +1203,7 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
{ {
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