diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 17ca9432f59cdc686b2c5c5864597cdf6e161b22..4b937c7f1bd0cfdcddf0420d21f02e58f6a5ff30 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -507,7 +507,6 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL ba params.mVertexBuffer->setBuffer(mask); params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset); - gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode); } if (tex_setup) diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 7ef2359f8d06b10c8281356bc99439bea7e2cdbc..74de938dcd8d249761c73719ea6e183d581acdeb 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -354,7 +354,6 @@ void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask) } params.mVertexBuffer->setBuffer(mask); params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset); - gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode); } } } @@ -380,7 +379,6 @@ inline void Draw(LLDrawInfo* draw, U32 mask) draw->mVertexBuffer->setBuffer(mask); LLRenderPass::applyModelMatrix(*draw); draw->mVertexBuffer->drawRange(draw->mDrawMode, draw->mStart, draw->mEnd, draw->mCount, draw->mOffset); - gPipeline.addTrianglesDrawn(draw->mCount, draw->mDrawMode); } bool LLDrawPoolAlpha::TexSetup(LLDrawInfo* draw, bool use_shaders, bool use_material, LLGLSLShader* current_shader) @@ -563,7 +561,6 @@ void LLDrawPoolAlpha::drawEmissive(U32 mask, LLDrawInfo* draw) { draw->mVertexBuffer->setBuffer((mask & ~LLVertexBuffer::MAP_COLOR) | LLVertexBuffer::MAP_EMISSIVE); draw->mVertexBuffer->drawRange(draw->mDrawMode, draw->mStart, draw->mEnd, draw->mCount, draw->mOffset); - gPipeline.addTrianglesDrawn(draw->mCount, draw->mDrawMode); } void LLDrawPoolAlpha::drawEmissiveInline(U32 mask, LLDrawInfo* draw) @@ -801,7 +798,6 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass) { //LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_DRAW); params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset); - gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode); } } diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index edfc258a6a29c5ff2beac0bd85513d711e0c3863..9936c77ff38d280c16d1658b1af67e4122acef41 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -2227,8 +2227,6 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) buff->setBuffer(data_mask); buff->drawRange(LLRender::TRIANGLES, start, end, count, offset); } - - gPipeline.addTrianglesDrawn(count, LLRender::TRIANGLES); } } } diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 76f03c554ad8961a4e8382d361501d8b19a73479..0701a62fb508e52da1079edd9d4fa3caee9af1a5 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -634,7 +634,6 @@ void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL } params.mVertexBuffer->setBuffer(mask); params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset); - gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode); } } @@ -1549,7 +1548,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL } params.mVertexBuffer->setBuffer(mask); params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset); - gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode); + if (tex_setup) { if (mShiny) diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp index e21110236767e77c245650b438b73afc6d858de7..29bc0f10a5f953cbcfd6aef270acf5f94b7f0243 100644 --- a/indra/newview/lldrawpoolmaterials.cpp +++ b/indra/newview/lldrawpoolmaterials.cpp @@ -228,7 +228,7 @@ void LLDrawPoolMaterials::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, params.mVertexBuffer->setBuffer(mask); params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset); - gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode); + if (tex_setup) { gGL.getTexUnit(0)->activate(); diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp index e4fe0e55e2afab2a0621c9f688d70dd6a7709efc..119b5dc5f86e57109924c1bf908568406af664e1 100644 --- a/indra/newview/lldrawpoolsimple.cpp +++ b/indra/newview/lldrawpoolsimple.cpp @@ -150,13 +150,6 @@ void LLDrawPoolGlow::render(S32 pass) } } -void LLDrawPoolGlow::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL batch_textures) -{ - //gGL.diffuseColor4ubv(params.mGlowColor.mV); - LLRenderPass::pushBatch(params, mask, texture, batch_textures); -} - - LLDrawPoolSimple::LLDrawPoolSimple() : LLRenderPass(POOL_SIMPLE) { diff --git a/indra/newview/lldrawpoolsimple.h b/indra/newview/lldrawpoolsimple.h index f7b6bdb7a5f33ce08840c0eac9c8895fe8680ff1..ad1d626cf26361ddcdc65db7cc3ae38fb2e97105 100644 --- a/indra/newview/lldrawpoolsimple.h +++ b/indra/newview/lldrawpoolsimple.h @@ -187,7 +187,6 @@ class LLDrawPoolGlow final : public LLRenderPass /*virtual*/ S32 getNumPasses(); void render(S32 pass = 0); - void pushBatch(LLDrawInfo& params, U32 mask, BOOL texture = TRUE, BOOL batch_textures = FALSE); }; diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index c253d23b9540747aee5acac8a0c21346bf1df352..3662197c5eb59e33fe04155623c142498af36d62 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -127,7 +127,6 @@ void LLDrawPoolTree::render(S32 pass) buff->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK); buff->drawRange(LLRender::TRIANGLES, 0, buff->getNumVerts()-1, buff->getNumIndices(), 0); - gPipeline.addTrianglesDrawn(buff->getNumIndices()); } } } diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 057e88a82d667eaf4076962d5db55214ca453009..609724b9d9b640406dad0ccf1e23cba036d0449d 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -2468,7 +2468,6 @@ S32 LLFace::pushVertices(const U16* index_array) const render_type = mDrawInfo->mDrawMode; } mVertexBuffer->drawRange(render_type, mGeomIndex, mGeomIndex+mGeomCount-1, mIndicesCount, mIndicesIndex); - gPipeline.addTrianglesDrawn(mIndicesCount, render_type); } return mIndicesCount; diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 7d89c97e263bee37bcda062462f15ab50ef818c9..113fa77401aac7f1561904623dd291023817c753 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -317,7 +317,6 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) buff->drawRange(LLRender::TRIANGLES, start, end, count, offset); gGL.popMatrix(); } - gPipeline.addTrianglesDrawn(count); triangle_count += count; diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 527e2d7e130b546a7098947f92b3911763a24f39..1fa4cad6ec240ea36d542a02d968544cabd96313 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -340,8 +340,6 @@ void update_statistics() LLTrace::Recording& last_frame_recording = LLTrace::get_frame_recording().getLastRecording(); - record(LLStatViewer::TRIANGLES_DRAWN_PER_FRAME, last_frame_recording.getSum(LLStatViewer::TRIANGLES_DRAWN)); - sample(LLStatViewer::ENABLE_VBO, (F64)LLVertexBuffer::sEnableVBOs); sample(LLStatViewer::LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail()); sample(LLStatViewer::DRAW_DISTANCE, (F64)LLPipeline::RenderFarClip); diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index 6503a786e16c2cef47b272b2f285d150429cf802..beb8acc231d475e955a7c4c0dc34ab88d88ae321 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -286,7 +286,6 @@ void LLVOWLSky::drawFsSky(void) mFsSkyVerts->setBuffer(LLDrawPoolWLSky::ADV_ATMO_SKY_VERTEX_DATA_MASK); mFsSkyVerts->drawRange(LLRender::TRIANGLES, 0, mFsSkyVerts->getNumVerts() - 1, mFsSkyVerts->getNumIndices(), 0); - gPipeline.addTrianglesDrawn(mFsSkyVerts->getNumIndices(), LLRender::TRIANGLES); LLVertexBuffer::unbind(); } @@ -313,7 +312,6 @@ void LLVOWLSky::drawDome(void) LLRender::TRIANGLE_STRIP, 0, strips_segment->getNumVerts()-1, strips_segment->getNumIndices(), 0); - gPipeline.addTrianglesDrawn(strips_segment->getNumIndices(), LLRender::TRIANGLE_STRIP); } LLVertexBuffer::unbind(); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index f70c95b4db2c81b172bc7b18f90175d110343bbb..e5c05c4aac631f2f9007f2a26c5293c50afc22a7 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4975,32 +4975,6 @@ void LLPipeline::renderGeomShadow(LLCamera& camera) gGL.loadMatrix(gGLModelView); } - -void LLPipeline::addTrianglesDrawn(S32 index_count, U32 render_type) -{ -#ifndef LL_RELEASE_FOR_DOWNLOAD - assertInitialized(); - S32 count = 0; - if (render_type == LLRender::TRIANGLE_STRIP) - { - count = index_count-2; - } - else - { - count = index_count/3; - } - - record(sStatBatchSize, count); - add(LLStatViewer::TRIANGLES_DRAWN, LLUnits::Triangles::fromValue(count)); - - if (LLPipeline::sRenderFrameTest) - { - gViewerWindow->getWindow()->swapBuffers(); - ms_sleep(16); - } -#endif -} - void LLPipeline::renderPhysicsDisplay() { if (!hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PHYSICS_SHAPES)) diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index b05583558fb4ba49a3dbea05f6ce1ff4fbeae45e..905025644cc4f188feb63404e45169f4af804fb7 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -340,8 +340,6 @@ class LLPipeline LLCullResult::sg_iterator endAlphaGroups(); - void addTrianglesDrawn(S32 index_count, U32 render_type = LLRender::TRIANGLES); - bool hasRenderDebugFeatureMask(const U32 mask) const { return bool(mRenderDebugFeatureMask & mask); } bool hasRenderDebugMask(const U64 mask) const { return bool(mRenderDebugMask & mask); } void setAllRenderDebugFeatures() { mRenderDebugFeatureMask = 0xffffffff; }