diff options
| author | Dave Houlton <euclid@lindenlab.com> | 2021-02-01 15:59:08 -0700 |
|---|---|---|
| committer | Dave Houlton <euclid@lindenlab.com> | 2021-02-01 15:59:08 -0700 |
| commit | f07b332ef0aafd1ecb82b6077309a5292c9cddc1 (patch) | |
| tree | a76fabd4f71bdbb86b7fe6efb9a6acc0529a429c /indra/llrender/llimagegl.cpp | |
| parent | baa81473149b9d5a6718529c4de08393e8a02b92 (diff) | |
| parent | 21565a1f3fe1ae737e2f91c58be2c3cb0b5a2fec (diff) | |
Merge branch 'master' into DV525-merge-6.4.13
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
| -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..0151d20128 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) |
