diff options
| author | Brad Linden <46733234+brad-linden@users.noreply.github.com> | 2024-02-09 09:47:19 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-09 09:47:19 -0800 |
| commit | 846337483c0d3cce0607efe2ff17ed04dc90801f (patch) | |
| tree | 9adb6550e3d81de000f31791ea3e302cc23a4d7a /indra/llrender/llglslshader.cpp | |
| parent | 23d44cb6653ee4ca46ec0e33f19b393b58f5332f (diff) | |
| parent | d6048bfcb2442ca7ec278864b9827d74873efa3a (diff) | |
Merge branch 'release/materials_featurette' into release/gltf-maint2
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
| -rw-r--r-- | indra/llrender/llglslshader.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index ccfb8f69be..be5ad08fbe 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -1184,12 +1184,14 @@ S32 LLGLSLShader::getTextureChannel(S32 uniform) const S32 LLGLSLShader::enableTexture(S32 uniform, LLTexUnit::eTextureType mode, LLTexUnit::eTextureColorSpace space) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; - + if (uniform < 0 || uniform >= (S32)mTexture.size()) { LL_SHADER_UNIFORM_ERRS() << "Uniform out of range: " << uniform << LL_ENDL; return -1; } + + S32 index = mTexture[uniform]; if (index != -1) { |
