summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/llrender/llvertexbuffer.cpp45
-rwxr-xr-xindra/newview/pipeline.cpp14
2 files changed, 23 insertions, 36 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index f1249a842a..fd7b846928 100755
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -2230,9 +2230,16 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
if((getTypeMask() & data_mask) != data_mask)
{
- llinfos << "Missing VB stream components." << llendl;
- DumpComponents(data_mask & ~getTypeMask());
- data_mask &= getTypeMask();
+ if (gDebugGL)
+ {
+ // Dump info about what was missing
+ //
+ DumpComponents(data_mask & ~getTypeMask());
+ llwarns << "Missing VB stream components. ^^" << llendl;
+ }
+ // Make sure we don't write checks we can't cash below...
+ //
+ data_mask = (data_mask & getTypeMask());
}
//set up pointers if the data mask is different ...
@@ -2257,27 +2264,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
required_mask |= required;
}
}
-
- static bool done_done_it = false;
-
- if (!done_done_it)
- {
- done_done_it = true;
-
- llinfos <<
- "MAP_VERTEX: " << MAP_VERTEX <<
- "MAP_VERTEX: " << MAP_NORMAL <<
- "MAP_VERTEX: " << MAP_TEXCOORD0 <<
- "MAP_VERTEX: " << MAP_TEXCOORD1 <<
- "MAP_VERTEX: " << MAP_TEXCOORD2 <<
- "MAP_VERTEX: " << MAP_TEXCOORD3 <<
- "MAP_VERTEX: " << MAP_COLOR <<
- "MAP_VERTEX: " << MAP_EMISSIVE <<
- "MAP_VERTEX: " << MAP_TANGENT << llendl;
-
-
- }
-
+
if ((data_mask & required_mask) != required_mask)
{
@@ -2302,14 +2289,14 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
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" << llendl;
+ default: llinfos << "Missing who effin knows: " << unsatisfied_flag << llendl;
}
}
- if (unsatisfied_mask & (1 << TYPE_INDEX))
- {
- llinfos << "Missing indices" << llendl;
- }
+ if (unsatisfied_mask & (1 << TYPE_INDEX))
+ {
+ llinfos << "Missing indices" << llendl;
+ }
llerrs << "Shader consumption mismatches data provision." << llendl;
}
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 05390f64f0..9aa375767b 100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8695,6 +8695,12 @@ void LLPipeline::renderDeferredLighting()
unbindDeferredShader(gDeferredSpotLightProgram);
}
+ //reset mDeferredVB to fullscreen triangle
+ mDeferredVB->getVertexStrider(vert);
+ vert[0].set(-1,1,0);
+ vert[1].set(-1,-3,0);
+ vert[2].set(3,1,0);
+
{
LLGLDepthTest depth(GL_FALSE);
@@ -8713,10 +8719,6 @@ void LLPipeline::renderDeferredLighting()
F32 far_z = 0.f;
- bindDeferredShader(gDeferredMultiLightProgram[0]);
-
- mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
-
while (!fullscreen_lights.empty())
{
LLFastTimer ftm(FTM_FULLSCREEN_LIGHTS);
@@ -8742,13 +8744,11 @@ void LLPipeline::renderDeferredLighting()
gDeferredMultiLightProgram[idx].uniform1f(LLShaderMgr::MULTI_LIGHT_FAR_Z, far_z);
far_z = 0.f;
count = 0;
- mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
+ mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
unbindDeferredShader(gDeferredMultiLightProgram[idx]);
}
}
-
- unbindDeferredShader(gDeferredMultiLightProgram[0]);
bindDeferredShader(gDeferredMultiSpotLightProgram);