diff options
author | Richard Linden <none@none> | 2013-09-05 14:04:13 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-09-05 14:04:13 -0700 |
commit | cbe397ad13665c7bc993e10d8fe1e4a876253378 (patch) | |
tree | 52cd665a1138a65bd8ebfc94478c665ea40b2e25 /indra/newview/lldrawpoolbump.cpp | |
parent | 12688c8b549d2baa33509dca60bbe14b039b17db (diff) |
changed fast timer over to using macro
another attempt to move mem stat into base class
Diffstat (limited to 'indra/newview/lldrawpoolbump.cpp')
-rwxr-xr-x | indra/newview/lldrawpoolbump.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 6c4226a9a6..010e718689 100755 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -234,7 +234,7 @@ S32 LLDrawPoolBump::getNumPasses() void LLDrawPoolBump::beginRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); switch( pass ) { case 0: @@ -261,7 +261,7 @@ void LLDrawPoolBump::beginRenderPass(S32 pass) void LLDrawPoolBump::render(S32 pass) { - LLFastTimer t(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); if (!gPipeline.hasRenderType(LLDrawPool::POOL_SIMPLE)) { @@ -294,7 +294,7 @@ void LLDrawPoolBump::render(S32 pass) void LLDrawPoolBump::endRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); switch( pass ) { case 0: @@ -325,7 +325,7 @@ void LLDrawPoolBump::endRenderPass(S32 pass) //static void LLDrawPoolBump::beginShiny(bool invisible) { - LLFastTimer t(FTM_RENDER_SHINY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY); if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))|| (invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))) { @@ -418,7 +418,7 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di void LLDrawPoolBump::renderShiny(bool invisible) { - LLFastTimer t(FTM_RENDER_SHINY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY); if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))|| (invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))) { @@ -477,7 +477,7 @@ void LLDrawPoolBump::unbindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& void LLDrawPoolBump::endShiny(bool invisible) { - LLFastTimer t(FTM_RENDER_SHINY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY); if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))|| (invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))) { @@ -497,7 +497,7 @@ void LLDrawPoolBump::endShiny(bool invisible) void LLDrawPoolBump::beginFullbrightShiny() { - LLFastTimer t(FTM_RENDER_SHINY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY); if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_FULLBRIGHT_SHINY)) { return; @@ -559,7 +559,7 @@ void LLDrawPoolBump::beginFullbrightShiny() void LLDrawPoolBump::renderFullbrightShiny() { - LLFastTimer t(FTM_RENDER_SHINY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY); if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_FULLBRIGHT_SHINY)) { return; @@ -582,7 +582,7 @@ void LLDrawPoolBump::renderFullbrightShiny() void LLDrawPoolBump::endFullbrightShiny() { - LLFastTimer t(FTM_RENDER_SHINY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY); if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_FULLBRIGHT_SHINY)) { return; @@ -713,7 +713,7 @@ void LLDrawPoolBump::beginBump(U32 pass) } sVertexMask = VERTEX_MASK_BUMP; - LLFastTimer t(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); // Optional second pass: emboss bump map stop_glerror(); @@ -765,7 +765,7 @@ void LLDrawPoolBump::renderBump(U32 pass) return; } - LLFastTimer ftm(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); LLGLDisable fog(GL_FOG); LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_LEQUAL); LLGLEnable blend(GL_BLEND); @@ -821,7 +821,7 @@ void LLDrawPoolBump::beginDeferredPass(S32 pass) { return; } - LLFastTimer ftm(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); mShiny = TRUE; gDeferredBumpProgram.bind(); diffuse_channel = gDeferredBumpProgram.enableTexture(LLViewerShaderMgr::DIFFUSE_MAP); @@ -836,7 +836,7 @@ void LLDrawPoolBump::endDeferredPass(S32 pass) { return; } - LLFastTimer ftm(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); mShiny = FALSE; gDeferredBumpProgram.disableTexture(LLViewerShaderMgr::DIFFUSE_MAP); gDeferredBumpProgram.disableTexture(LLViewerShaderMgr::BUMP_MAP); @@ -850,7 +850,7 @@ void LLDrawPoolBump::renderDeferred(S32 pass) { return; } - LLFastTimer ftm(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); U32 type = LLRenderPass::PASS_BUMP; LLCullResult::drawinfo_iterator begin = gPipeline.beginRenderMap(type); @@ -1093,7 +1093,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText } -static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_STANDARD_LOADED("Bump Standard Callback"); +static LLTrace::TimeBlock FTM_BUMP_SOURCE_STANDARD_LOADED("Bump Standard Callback"); // static void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ) @@ -1117,22 +1117,22 @@ void LLBumpImageList::onSourceDarknessLoaded( BOOL success, LLViewerFetchedTextu } } -static LLFastTimer::DeclareTimer FTM_BUMP_GEN_NORMAL("Generate Normal Map"); -static LLFastTimer::DeclareTimer FTM_BUMP_CREATE_TEXTURE("Create GL Normal Map"); +static LLTrace::TimeBlock FTM_BUMP_GEN_NORMAL("Generate Normal Map"); +static LLTrace::TimeBlock FTM_BUMP_CREATE_TEXTURE("Create GL Normal Map"); void LLBumpImageList::onSourceStandardLoaded( BOOL success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) { if (success && LLPipeline::sRenderDeferred) { - LLFastTimer t(FTM_BUMP_SOURCE_STANDARD_LOADED); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_STANDARD_LOADED); LLPointer<LLImageRaw> nrm_image = new LLImageRaw(src->getWidth(), src->getHeight(), 4); { - LLFastTimer t(FTM_BUMP_GEN_NORMAL); + LL_RECORD_BLOCK_TIME(FTM_BUMP_GEN_NORMAL); generateNormalMapFromAlpha(src, nrm_image); } src_vi->setExplicitFormat(GL_RGBA, GL_RGBA); { - LLFastTimer t(FTM_BUMP_CREATE_TEXTURE); + LL_RECORD_BLOCK_TIME(FTM_BUMP_CREATE_TEXTURE); src_vi->createGLTexture(src_vi->getDiscardLevel(), nrm_image); } } @@ -1194,27 +1194,27 @@ void LLBumpImageList::generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nr } -static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_LOADED("Bump Source Loaded"); -static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_ENTRIES_UPDATE("Entries Update"); -static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_MIN_MAX("Min/Max"); -static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RGB2LUM("RGB to Luminance"); -static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RESCALE("Rescale"); -static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_GEN_NORMAL("Generate Normal"); -static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_CREATE("Bump Source Create"); +static LLTrace::TimeBlock FTM_BUMP_SOURCE_LOADED("Bump Source Loaded"); +static LLTrace::TimeBlock FTM_BUMP_SOURCE_ENTRIES_UPDATE("Entries Update"); +static LLTrace::TimeBlock FTM_BUMP_SOURCE_MIN_MAX("Min/Max"); +static LLTrace::TimeBlock FTM_BUMP_SOURCE_RGB2LUM("RGB to Luminance"); +static LLTrace::TimeBlock FTM_BUMP_SOURCE_RESCALE("Rescale"); +static LLTrace::TimeBlock FTM_BUMP_SOURCE_GEN_NORMAL("Generate Normal"); +static LLTrace::TimeBlock FTM_BUMP_SOURCE_CREATE("Bump Source Create"); // static void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code ) { if( success ) { - LLFastTimer t(FTM_BUMP_SOURCE_LOADED); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_LOADED); bump_image_map_t& entries_list(bump_code == BE_BRIGHTNESS ? gBumpImageList.mBrightnessEntries : gBumpImageList.mDarknessEntries ); bump_image_map_t::iterator iter = entries_list.find(source_asset_id); { - LLFastTimer t(FTM_BUMP_SOURCE_ENTRIES_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_ENTRIES_UPDATE); if (iter == entries_list.end() || iter->second.isNull() || iter->second->getWidth() != src->getWidth() || @@ -1257,7 +1257,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI case 1: case 2: { - LLFastTimer t(FTM_BUMP_SOURCE_MIN_MAX); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_MIN_MAX); if( src_data_size == dst_data_size * src_components ) { for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components ) @@ -1283,7 +1283,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI case 3: case 4: { - LLFastTimer t(FTM_BUMP_SOURCE_RGB2LUM); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_RGB2LUM); if( src_data_size == dst_data_size * src_components ) { for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components ) @@ -1316,7 +1316,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI if( maximum > minimum ) { - LLFastTimer t(FTM_BUMP_SOURCE_RESCALE); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_RESCALE); U8 bias_and_scale_lut[256]; F32 twice_one_over_range = 2.f / (maximum - minimum); S32 i; @@ -1352,7 +1352,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI if (!LLPipeline::sRenderDeferred) { - LLFastTimer t(FTM_BUMP_SOURCE_CREATE); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_CREATE); bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA); bump->createGLTexture(0, dst_image); } @@ -1363,13 +1363,13 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI bump->getGLTexture()->setAllowCompression(false); { - LLFastTimer t(FTM_BUMP_SOURCE_CREATE); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_CREATE); bump->setExplicitFormat(GL_RGBA8, GL_ALPHA); bump->createGLTexture(0, dst_image); } { - LLFastTimer t(FTM_BUMP_SOURCE_GEN_NORMAL); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_GEN_NORMAL); gPipeline.mScreen.bindTarget(); LLGLDepthTest depth(GL_FALSE); @@ -1561,7 +1561,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL void LLDrawPoolInvisible::render(S32 pass) { //render invisiprims - LLFastTimer t(FTM_RENDER_INVISIBLE); + LL_RECORD_BLOCK_TIME(FTM_RENDER_INVISIBLE); if (gPipeline.canUseVertexShaders()) { @@ -1601,7 +1601,7 @@ void LLDrawPoolInvisible::endDeferredPass( S32 pass ) void LLDrawPoolInvisible::renderDeferred( S32 pass ) { //render invisiprims; this doesn't work becaue it also blocks all the post-deferred stuff #if 0 - LLFastTimer t(FTM_RENDER_INVISIBLE); + LL_RECORD_BLOCK_TIME(FTM_RENDER_INVISIBLE); U32 invisi_mask = LLVertexBuffer::MAP_VERTEX; glStencilMask(0); |