Commit f8cdc74c by Nicolas Capens Committed by Nicolas Capens

Guard against copying from a zero-sized 3D image.

Bug chromium:825545 Change-Id: I37d6192bf65115938943f45d43e153196a7d569a Reviewed-on: https://swiftshader-review.googlesource.com/18128Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 5cd502b4
......@@ -649,6 +649,12 @@ namespace es2
int dHeight = dest->getHeight();
int dDepth = dest->getDepth();
if((sWidth == 0) || (sHeight == 0) || (sDepth == 0) ||
(dWidth == 0) || (dHeight == 0) || (dDepth == 0))
{
return true; // no work to do
}
bool scaling = (sWidth != dWidth) || (sHeight != dHeight) || (sDepth != dDepth);
bool equalFormats = source->getInternalFormat() == dest->getInternalFormat();
bool alpha0xFF = 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