diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-10-20 14:25:54 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-10-20 14:25:54 +0300 |
commit | 83600bb16ac305542de9bb9fd8eba1bec90dc1b0 (patch) | |
tree | f4afff3b243399a04e381df336de2982f17cd547 /indra | |
parent | 67a326116bcb3cbb1b1394632468288295273aa5 (diff) |
SL-14108 FIXED Viewer crashes immediately after login
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llrender/llimagegl.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 3b6a49735e..c85b9a890a 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1386,6 +1386,15 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S return FALSE; } + if (mHasExplicitFormat && + (mFormatPrimary == GL_RGBA && mComponents < 4) || + (mFormatPrimary == GL_RGB && mComponents < 3)) + + { + LL_WARNS() << "Incorrect format: " << std::hex << mFormatPrimary << " components: " << (U32)mComponents << LL_ENDL; + mHasExplicitFormat = FALSE; + } + if( !mHasExplicitFormat ) { switch (mComponents) |