Commit 5eeff0e4 by Minmin Gong Committed by Commit Bot

Fix ETC->DXT small mip transcode crash.

BUG=angleproject:1510 Change-Id: I42355607235a05fe276342084acd1eb359c16de4 Reviewed-on: https://chromium-review.googlesource.com/390414Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
parent b6fa043d
...@@ -891,10 +891,10 @@ struct ETC2Block ...@@ -891,10 +891,10 @@ struct ETC2Block
std::swap(dxEnd, dyEnd); std::swap(dxEnd, dyEnd);
} }
for (size_t j = dyBegin; j < dyEnd && (y + j) < h; j++) for (size_t j = dyBegin; j < dyEnd; j++)
{ {
int *row = &pixelIndices[j * 4]; int *row = &pixelIndices[j * 4];
for (size_t i = dxBegin; i < dxEnd && (x + i) < w; i++) for (size_t i = dxBegin; i < dxEnd; i++)
{ {
const size_t pixelIndex = subblockIdx * 4 + getIndex(i, j); const size_t pixelIndex = subblockIdx * 4 + getIndex(i, j);
row[i] = static_cast<int>(pixelIndex); row[i] = static_cast<int>(pixelIndex);
......
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