summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llface.cpp2
-rw-r--r--indra/newview/llvovolume.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index eab3dcfadd..6dbeae6677 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1658,6 +1658,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
while(dst < end);
F32 index = (F32) (mTextureIndex < 255 ? mTextureIndex : 0);
+
+ llassert(index <= LLGLSLShader::sIndexedTextureChannels-1);
F32 *index_dst = (F32*) vertices;
F32 *index_end = (F32*) end;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 827c5b9cb5..baab191cb6 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4652,7 +4652,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
buffer_index = -1;
}
- S32 texture_index_channels = gGLManager.mNumTextureImageUnits-1; //always reserve one for shiny for now just for simplicity
+ S32 texture_index_channels = LLGLSLShader::sIndexedTextureChannels-1; //always reserve one for shiny for now just for simplicity
if (gGLManager.mGLVersion < 3.1f)
{