diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-10-22 22:07:00 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-10-22 22:22:17 +0300 |
commit | 0bf11e45ea34a21b980c36c99be476613552d560 (patch) | |
tree | da1709b074febd1c92f768c8fd70d3665818c575 /indra/llrender | |
parent | 83600bb16ac305542de9bb9fd8eba1bec90dc1b0 (diff) |
SL-14150 Handle more cases of corrupted cache
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llimagegl.cpp | 4 | ||||
-rw-r--r-- | indra/llrender/llimagegl.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index c85b9a890a..0151d20128 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1387,8 +1387,8 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S } if (mHasExplicitFormat && - (mFormatPrimary == GL_RGBA && mComponents < 4) || - (mFormatPrimary == GL_RGB && mComponents < 3)) + ((mFormatPrimary == GL_RGBA && mComponents < 4) || + (mFormatPrimary == GL_RGB && mComponents < 3))) { LL_WARNS() << "Incorrect format: " << std::hex << mFormatPrimary << " components: " << (U32)mComponents << LL_ENDL; diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index 4f3d7eed0a..472af75d9e 100644 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -133,6 +133,7 @@ public: S32 getMipBytes(S32 discard_level = -1) const; BOOL getBoundRecently() const; BOOL isJustBound() const; + BOOL getHasEplixitFormat() const { return mHasExplicitFormat; } LLGLenum getPrimaryFormat() const { return mFormatPrimary; } LLGLenum getFormatType() const { return mFormatType; } @@ -197,7 +198,7 @@ private: U16 mPickMaskWidth; U16 mPickMaskHeight; S8 mUseMipMaps; - S8 mHasExplicitFormat; // If false (default), GL format is f(mComponents) + BOOL mHasExplicitFormat; // If false (default), GL format is f(mComponents) S8 mAutoGenMips; BOOL mIsMask; |