summaryrefslogtreecommitdiffstats
path: root/gfx/angle/src/libANGLE/ImageIndex.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-11 18:11:13 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-11 18:11:13 +0200
commit4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0 (patch)
treef000dd831240707a03b8c806db292c2a15cde3ce /gfx/angle/src/libANGLE/ImageIndex.cpp
parent3b7ffb477eec078c7036c92c6a51bb5de6de4f28 (diff)
downloadUXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.gz
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.lz
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.xz
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.zip
Roll back to ANGLE/2845
Diffstat (limited to 'gfx/angle/src/libANGLE/ImageIndex.cpp')
-rwxr-xr-xgfx/angle/src/libANGLE/ImageIndex.cpp27
1 files changed, 4 insertions, 23 deletions
diff --git a/gfx/angle/src/libANGLE/ImageIndex.cpp b/gfx/angle/src/libANGLE/ImageIndex.cpp
index f74ce19d9..38c1941a3 100755
--- a/gfx/angle/src/libANGLE/ImageIndex.cpp
+++ b/gfx/angle/src/libANGLE/ImageIndex.cpp
@@ -135,12 +135,7 @@ ImageIndexIterator::ImageIndexIterator(GLenum type, const Range<GLint> &mipRange
GLint ImageIndexIterator::maxLayer() const
{
- if (mLayerCounts)
- {
- ASSERT(mCurrentMip >= 0);
- return (mCurrentMip < mMipRange.end) ? mLayerCounts[mCurrentMip] : 0;
- }
- return mLayerRange.end;
+ return (mLayerCounts ? static_cast<GLint>(mLayerCounts[mCurrentMip]) : mLayerRange.end);
}
ImageIndex ImageIndexIterator::next()
@@ -154,29 +149,21 @@ ImageIndex ImageIndexIterator::next()
if (mCurrentLayer != ImageIndex::ENTIRE_LEVEL)
{
- if (mCurrentLayer < maxLayer() - 1)
+ if (mCurrentLayer < maxLayer()-1)
{
mCurrentLayer++;
}
- else if (mCurrentMip < mMipRange.end - 1)
+ else if (mCurrentMip < mMipRange.end-1)
{
mCurrentMip++;
mCurrentLayer = mLayerRange.start;
}
- else
- {
- done();
- }
}
- else if (mCurrentMip < mMipRange.end - 1)
+ else if (mCurrentMip < mMipRange.end-1)
{
mCurrentMip++;
mCurrentLayer = mLayerRange.start;
}
- else
- {
- done();
- }
return value;
}
@@ -198,10 +185,4 @@ bool ImageIndexIterator::hasNext() const
return (mCurrentMip < mMipRange.end || mCurrentLayer < maxLayer());
}
-void ImageIndexIterator::done()
-{
- mCurrentMip = mMipRange.end;
- mCurrentLayer = maxLayer();
}
-
-} // namespace gl