diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-08-05 11:35:53 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-08-05 11:35:53 +0200 |
commit | 6bd66b1728eeddb058066edda740aaeb2ceaec23 (patch) | |
tree | 985faf01c526763515731569fa01a99f4dbef36e /gfx/angle/src/libANGLE/ImageIndex.cpp | |
parent | e0a8dcfed131ffa58a5e2cb1d30fe48c745c2fdc (diff) | |
parent | 559824514dc95e02fbe81f1786e6ac13ee8e9d55 (diff) | |
download | UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar.gz UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar.lz UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar.xz UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.zip |
Merge branch 'master' into js-modules
Diffstat (limited to 'gfx/angle/src/libANGLE/ImageIndex.cpp')
-rwxr-xr-x | gfx/angle/src/libANGLE/ImageIndex.cpp | 27 |
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 |