summaryrefslogtreecommitdiff
path: root/indra/llrender/llvertexbuffer.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-09-19 13:45:39 -0700
committerMerov Linden <merov@lindenlab.com>2013-09-19 13:45:39 -0700
commit5b197db0c46b142f977670e3ca6aea9687622e78 (patch)
treeacbb40dfeb731d1f8b3f9d8656bd2ee28384b22c /indra/llrender/llvertexbuffer.cpp
parent094a226fd8027405dd220dbc25951a3b70c9fa67 (diff)
parentad777b46d0fe5d790e43efb1771e9f64f3ad3dfb (diff)
Pull from lindenlab/viewer-release
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rwxr-xr-xindra/llrender/llvertexbuffer.cpp41
1 files changed, 36 insertions, 5 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 01541026b1..6a7cec3bad 100755
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -753,10 +753,10 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi
U16* idx = ((U16*) getIndicesPointer())+indices_offset;
stop_glerror();
- LLGLSLShader::startProfile();
- glDrawRangeElements(sGLMode[mode], start, end, count, GL_UNSIGNED_SHORT,
+ LLGLSLShader::startProfile();
+ glDrawRangeElements(sGLMode[mode], start, end, count, GL_UNSIGNED_SHORT,
idx);
- LLGLSLShader::stopProfile(count, mode);
+ LLGLSLShader::stopProfile(count, mode);
stop_glerror();
@@ -2236,10 +2236,41 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
required_mask |= required;
}
}
-
+
if ((data_mask & required_mask) != required_mask)
{
- llwarns << "Shader consumption mismatches data provision." << llendl;
+
+ U32 unsatisfied_mask = (required_mask & ~data_mask);
+ U32 i = 0;
+
+ while (i < TYPE_MAX)
+ {
+ U32 unsatisfied_flag = unsatisfied_mask & (1 << i);
+ switch (unsatisfied_flag)
+ {
+ case MAP_VERTEX: llinfos << "Missing vert pos" << llendl; break;
+ case MAP_NORMAL: llinfos << "Missing normals" << llendl; break;
+ case MAP_TEXCOORD0: llinfos << "Missing TC 0" << llendl; break;
+ case MAP_TEXCOORD1: llinfos << "Missing TC 1" << llendl; break;
+ case MAP_TEXCOORD2: llinfos << "Missing TC 2" << llendl; break;
+ case MAP_TEXCOORD3: llinfos << "Missing TC 3" << llendl; break;
+ case MAP_COLOR: llinfos << "Missing vert color" << llendl; break;
+ case MAP_EMISSIVE: llinfos << "Missing emissive" << llendl; break;
+ case MAP_TANGENT: llinfos << "Missing tangent" << llendl; break;
+ case MAP_WEIGHT: llinfos << "Missing weight" << llendl; break;
+ case MAP_WEIGHT4: llinfos << "Missing weightx4" << llendl; break;
+ case MAP_CLOTHWEIGHT: llinfos << "Missing clothweight" << llendl; break;
+ case MAP_TEXTURE_INDEX: llinfos << "Missing tex index" << llendl; break;
+ default: llinfos << "Missing who effin knows: " << unsatisfied_flag << llendl;
+ }
+ }
+
+ if (unsatisfied_mask & (1 << TYPE_INDEX))
+ {
+ llinfos << "Missing indices" << llendl;
+ }
+
+ llerrs << "Shader consumption mismatches data provision." << llendl;
}
}
}