diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-02-01 22:14:56 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-02-01 22:14:56 +0200 |
| commit | f047e2236c240aab0a633b147818b79b6746b2c5 (patch) | |
| tree | ac67c13356c08300df9e7c61bab700ab73e25a3b /indra/llrender/llimagegl.cpp | |
| parent | 0d324bb24db49f6f28d7e7f14fd69e7676de8fe6 (diff) | |
| parent | 21565a1f3fe1ae737e2f91c58be2c3cb0b5a2fec (diff) | |
Merge branch 'master' into DRTVWR-522-maint
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) |
