diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-02-01 22:15:04 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-02-01 22:15:04 +0200 |
| commit | cc73af4ff1d3b48a36a5bfa173d2c433565055c0 (patch) | |
| tree | aa4c735519a3d0dcd71b4dec8e5c6485df861456 /indra/llrender/llimagegl.cpp | |
| parent | aff37221dd26bc939b58ab959c8183cd36647aa6 (diff) | |
| parent | 21565a1f3fe1ae737e2f91c58be2c3cb0b5a2fec (diff) | |
Merge branch 'master' into DRTVWR-527-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) |
