summaryrefslogtreecommitdiff
path: root/indra/llrender/llgl.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-05-16 12:26:17 -0500
committerDave Parks <davep@lindenlab.com>2022-05-16 12:26:17 -0500
commitb2141e94465998d13ab4b5d894b0edcdad0e8216 (patch)
treecba0541baffa141e9e3e2aecd16ce8cd9457c88c /indra/llrender/llgl.cpp
parent3400e5fd302c0d9dea6386c4d5bf38876f2cc287 (diff)
parent63095005578007345d9916ebc6855246cdb08c7c (diff)
Merge remote-tracking branch 'remotes/origin/DRTVWR-546' into DRTVWR-559
Diffstat (limited to 'indra/llrender/llgl.cpp')
-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 6023796f7c..1a9203ef02 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -733,20 +733,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;