Commit e5882825 by Corentin Wallez Committed by Commit Bot

Texture::copyImage: Correctly compare against FBAttachment

There is no functional changes, but avoids an incorrect static_cast of pointers when looking to skip the clear in a copyImage of an image onto itself. Change-Id: I35949005016dab5df01e58d27de53dccf38d50c7 Bug: chromium:1125354 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2395617 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
parent 2d00262a
......@@ -1198,7 +1198,7 @@ angle::Result Texture::copyImage(Context *context,
forceCopySubImage = ((sourceArea.x < 0) || (sourceArea.y < 0) ||
((sourceArea.x + sourceArea.width) > fbSize.width) ||
((sourceArea.y + sourceArea.height) > fbSize.height)) &&
(sourceReadAttachment->getTexture() != this);
(sourceReadAttachment->getResource() != this);
Rectangle clippedArea;
if (ClipRectangle(sourceArea, Rectangle(0, 0, fbSize.width, fbSize.height), &clippedArea))
{
......
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