summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolbump.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-10-08 11:59:24 -0700
committerRichard Linden <none@none>2013-10-08 11:59:24 -0700
commit80dfbbaacd82179e54163ed48b1bc444e3becbd5 (patch)
treeda3858b58b5ec9c34d6eefa60c4fe87fc5743249 /indra/newview/lldrawpoolbump.cpp
parentf7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff)
parent2eeee8a9491398697a8f3167bc4f715a3970fc3a (diff)
merge from viewer-release
Diffstat (limited to 'indra/newview/lldrawpoolbump.cpp')
-rwxr-xr-xindra/newview/lldrawpoolbump.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 6b4c5cfca1..ef41cbd989 100755
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -104,7 +104,7 @@ void LLStandardBumpmap::addstandard()
// can't assert; we destroyGL and restoreGL a lot during *first* startup, which populates this list already, THEN we explicitly init the list as part of *normal* startup. Sigh. So clear the list every time before we (re-)add the standard bumpmaps.
//llassert( LLStandardBumpmap::sStandardBumpmapCount == 0 );
clear();
- llinfos << "Adding standard bumpmaps." << llendl;
+ LL_INFOS() << "Adding standard bumpmaps." << LL_ENDL;
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount++] = LLStandardBumpmap("None"); // BE_NO_BUMP
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount++] = LLStandardBumpmap("Brightness"); // BE_BRIGHTNESS
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount++] = LLStandardBumpmap("Darkness"); // BE_DARKNESS
@@ -113,7 +113,7 @@ void LLStandardBumpmap::addstandard()
LLFILE* file = LLFile::fopen( file_name, "rt" ); /*Flawfinder: ignore*/
if( !file )
{
- llwarns << "Could not open std_bump <" << file_name << ">" << llendl;
+ LL_WARNS() << "Could not open std_bump <" << file_name << ">" << LL_ENDL;
return;
}
@@ -122,13 +122,13 @@ void LLStandardBumpmap::addstandard()
S32 fields_read = fscanf( file, "LLStandardBumpmap version %d", &file_version );
if( fields_read != 1 )
{
- llwarns << "Bad LLStandardBumpmap header" << llendl;
+ LL_WARNS() << "Bad LLStandardBumpmap header" << LL_ENDL;
return;
}
if( file_version > STD_BUMP_LATEST_FILE_VERSION )
{
- llwarns << "LLStandardBumpmap has newer version (" << file_version << ") than viewer (" << STD_BUMP_LATEST_FILE_VERSION << ")" << llendl;
+ LL_WARNS() << "LLStandardBumpmap has newer version (" << file_version << ") than viewer (" << STD_BUMP_LATEST_FILE_VERSION << ")" << LL_ENDL;
return;
}
@@ -145,11 +145,11 @@ void LLStandardBumpmap::addstandard()
}
if( fields_read != 2 )
{
- llwarns << "Bad LLStandardBumpmap entry" << llendl;
+ LL_WARNS() << "Bad LLStandardBumpmap entry" << LL_ENDL;
return;
}
-// llinfos << "Loading bumpmap: " << bump_image_id << " from viewerart" << llendl;
+// LL_INFOS() << "Loading bumpmap: " << bump_image_id << " from viewerart" << LL_ENDL;
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mLabel = label;
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage =
LLViewerTextureManager::getFetchedTexture(LLUUID(bump_image_id));
@@ -165,7 +165,7 @@ void LLStandardBumpmap::addstandard()
// static
void LLStandardBumpmap::clear()
{
- llinfos << "Clearing standard bumpmaps." << llendl;
+ LL_INFOS() << "Clearing standard bumpmaps." << LL_ENDL;
for( U32 i = 0; i < LLStandardBumpmap::sStandardBumpmapCount; i++ )
{
gStandardBumpmapList[i].mLabel.assign("");
@@ -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)))
{
@@ -479,7 +479,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)))
{
@@ -499,7 +499,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;
@@ -561,7 +561,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;
@@ -584,7 +584,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;
@@ -715,7 +715,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();
@@ -767,7 +767,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);
@@ -823,7 +823,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);
@@ -838,7 +838,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);
@@ -852,7 +852,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);
@@ -929,7 +929,7 @@ void LLBumpImageList::init()
void LLBumpImageList::clear()
{
- llinfos << "Clearing dynamic bumpmaps." << llendl;
+ LL_INFOS() << "Clearing dynamic bumpmaps." << LL_ENDL;
// these will be re-populated on-demand
mBrightnessEntries.clear();
mDarknessEntries.clear();
@@ -1005,7 +1005,7 @@ void LLBumpImageList::updateImages()
if( destroy )
{
- //llinfos << "*** Destroying bright " << (void*)image << llendl;
+ //LL_INFOS() << "*** Destroying bright " << (void*)image << LL_ENDL;
mBrightnessEntries.erase(curiter); // deletes the image thanks to reference counting
}
}
@@ -1032,7 +1032,7 @@ void LLBumpImageList::updateImages()
if( destroy )
{
- //llinfos << "*** Destroying dark " << (void*)image << llendl;;
+ //LL_INFOS() << "*** Destroying dark " << (void*)image << LL_ENDL;;
mDarknessEntries.erase(curiter); // deletes the image thanks to reference counting
}
}
@@ -1095,7 +1095,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 )
@@ -1119,22 +1119,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);
}
}
@@ -1196,27 +1196,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() ||
@@ -1259,7 +1259,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 )
@@ -1285,7 +1285,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 )
@@ -1318,7 +1318,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;
@@ -1354,7 +1354,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);
}
@@ -1365,13 +1365,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);
@@ -1568,7 +1568,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())
{
@@ -1608,7 +1608,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);