summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2022-05-18 14:08:24 -0400
committerNat Goodspeed <nat@lindenlab.com>2022-05-18 14:08:24 -0400
commitc0aa1a1202678fdde0206c9372fb071c028cfe5b (patch)
tree614a5e0b9e24343c59709a9378050b601dd0f828 /indra/llrender
parent06aa68c2fbcd83cb00465c9f14933bda276b11e8 (diff)
parenta9363222618a879dd7d0d78471f8773af6b61618 (diff)
SL-17219: Merge 'DRTVWR-546' of lindenlab/viewer into SL-17219
Update task branch from main project branch.
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llgl.cpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 639d1fba32..18168d1c3f 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -722,20 +722,23 @@ bool LLGLManager::initGL()
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &num_tex_image_units);
mNumTextureImageUnits = llmin(num_tex_image_units, 32);
- if (LLRender::sGLCoreProfile)
- {
- mNumTextureUnits = llmin(mNumTextureImageUnits, MAX_GL_TEXTURE_UNITS);
- }
- else if (mHasMultitexture)
- {
- GLint num_tex_units;
- glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &num_tex_units);
- mNumTextureUnits = llmin(num_tex_units, (GLint)MAX_GL_TEXTURE_UNITS);
- if (mIsIntel)
- {
- mNumTextureUnits = llmin(mNumTextureUnits, 2);
- }
- }
+ if (mHasMultitexture)
+ {
+ if (LLRender::sGLCoreProfile)
+ {
+ mNumTextureUnits = llmin(mNumTextureImageUnits, MAX_GL_TEXTURE_UNITS);
+ }
+ else
+ {
+ GLint num_tex_units;
+ glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &num_tex_units);
+ mNumTextureUnits = llmin(num_tex_units, (GLint)MAX_GL_TEXTURE_UNITS);
+ if (mIsIntel)
+ {
+ mNumTextureUnits = llmin(mNumTextureUnits, 2);
+ }
+ }
+ }
else
{
mHasRequirements = FALSE;