diff options
| author | Richard Linden <none@none> | 2013-10-08 11:59:24 -0700 |
|---|---|---|
| committer | Richard Linden <none@none> | 2013-10-08 11:59:24 -0700 |
| commit | 80dfbbaacd82179e54163ed48b1bc444e3becbd5 (patch) | |
| tree | da3858b58b5ec9c34d6eefa60c4fe87fc5743249 /indra/newview/lldrawpoolalpha.cpp | |
| parent | f7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff) | |
| parent | 2eeee8a9491398697a8f3167bc4f715a3970fc3a (diff) | |
merge from viewer-release
Diffstat (limited to 'indra/newview/lldrawpoolalpha.cpp')
| -rwxr-xr-x | indra/newview/lldrawpoolalpha.cpp | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 6c5d229dba..2f9e5813c0 100755 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -89,7 +89,7 @@ S32 LLDrawPoolAlpha::getNumPostDeferredPasses() void LLDrawPoolAlpha::beginPostDeferredPass(S32 pass) { - LLFastTimer t(FTM_RENDER_ALPHA); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA); if (pass == 0) { @@ -179,7 +179,7 @@ void LLDrawPoolAlpha::renderPostDeferred(S32 pass) void LLDrawPoolAlpha::beginRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_ALPHA); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA); if (LLPipeline::sImpostorRender) { @@ -211,7 +211,7 @@ void LLDrawPoolAlpha::beginRenderPass(S32 pass) void LLDrawPoolAlpha::endRenderPass( S32 pass ) { - LLFastTimer t(FTM_RENDER_ALPHA); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA); LLRenderPass::endRenderPass(pass); if(gPipeline.canUseWindLightShaders()) @@ -222,7 +222,7 @@ void LLDrawPoolAlpha::endRenderPass( S32 pass ) void LLDrawPoolAlpha::render(S32 pass) { - LLFastTimer t(FTM_RENDER_ALPHA); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA); LLGLSPipelineAlpha gls_pipeline_alpha; @@ -336,7 +336,7 @@ void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask) for (LLCullResult::sg_iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i) { LLSpatialGroup* group = *i; - if (group->mSpatialPartition->mRenderByGroup && + if (group->getSpatialPartition()->mRenderByGroup && !group->isDead()) { LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA]; @@ -363,6 +363,9 @@ void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask) } } +static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_GROUP_LOOP("Alpha Group"); +static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_PUSH("Alpha Push Verts"); + void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass) { BOOL initialized_lighting = FALSE; @@ -374,20 +377,20 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass) { LLSpatialGroup* group = *i; llassert(group); - llassert(group->mSpatialPartition); + llassert(group->getSpatialPartition()); - if (group->mSpatialPartition->mRenderByGroup && + if (group->getSpatialPartition()->mRenderByGroup && !group->isDead()) { - bool is_particle_or_hud_particle = group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_PARTICLE - || group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_HUD_PARTICLE; + bool is_particle_or_hud_particle = group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_PARTICLE + || group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD_PARTICLE; bool draw_glow_for_this_partition = mVertexShaderLevel > 0 && // no shaders = no glow. // All particle systems seem to come off the wire with texture entries which claim that they glow. This is probably a bug in the data. Suppress. !is_particle_or_hud_particle; - static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_GROUP_LOOP("Alpha Group"); - LLFastTimer t(FTM_RENDER_ALPHA_GROUP_LOOP); + + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_GROUP_LOOP); bool disable_cull = is_particle_or_hud_particle; LLGLDisable cull(disable_cull ? GL_CULL_FACE : 0); @@ -400,7 +403,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass) if ((params.mVertexBuffer->getTypeMask() & mask) != mask) { //FIXME! - llwarns << "Missing required components, skipping render batch." << llendl; + LL_WARNS() << "Missing required components, skipping render batch." << LL_ENDL; continue; } @@ -422,14 +425,14 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass) } LLRenderPass::applyModelMatrix(params); - + LLMaterial* mat = NULL; if (deferred_render) { mat = params.mMaterial; } - + if (params.mFullbright) { // Turn off lighting if it hasn't already been so. @@ -499,7 +502,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass) LLGLSLShader::bindNoShader(); current_shader = NULL; } - + if (use_shaders && mat) { // We have a material. Supply the appropriate data here. @@ -549,7 +552,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass) } } } - else + else { //not batching textures or batch has only 1 texture -- might need a texture matrix if (params.mTexture.notNull()) { @@ -560,7 +563,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass) } else { - gGL.getTexUnit(0)->bind(params.mTexture, TRUE); + gGL.getTexUnit(0)->bind(params.mTexture, TRUE) ; } if (params.mTextureMatrix) @@ -578,9 +581,8 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass) } } - static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_PUSH("Alpha Push Verts"); { - LLFastTimer t(FTM_RENDER_ALPHA_PUSH); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_PUSH); gGL.blendFunc((LLRender::eBlendFactor) params.mBlendFuncSrc, (LLRender::eBlendFactor) params.mBlendFuncDst, mAlphaSFactor, mAlphaDFactor); params.mVertexBuffer->setBuffer(mask & ~(params.mFullbright ? (LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2) : 0)); |
