summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-09-05 14:21:57 -0700
committerRichard Linden <none@none>2013-09-05 14:21:57 -0700
commit9dc6478544711b1f03c9f7010421f9c8ebbbe008 (patch)
tree1d28248570ac6e48596c787734bc39a891d9752e /indra/llrender
parent736efc7b574635d5c86a97a33b456dd79a035777 (diff)
parentcbe397ad13665c7bc993e10d8fe1e4a876253378 (diff)
Automated merge with http://bitbucket.org/lindenlab/viewer-interesting
Diffstat (limited to 'indra/llrender')
-rwxr-xr-xindra/llrender/llfontgl.cpp4
-rwxr-xr-xindra/llrender/llimagegl.cpp34
-rw-r--r--indra/llrender/llrender2dutils.cpp8
-rwxr-xr-xindra/llrender/llvertexbuffer.cpp58
4 files changed, 52 insertions, 52 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index ce5757a6ae..b1ff2f7e07 100755
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -98,7 +98,7 @@ BOOL LLFontGL::loadFace(const std::string& filename, F32 point_size, F32 vert_dp
return mFontFreetype->loadFace(filename, point_size, vert_dpi, horz_dpi, components, is_fallback);
}
-static LLFastTimer::DeclareTimer FTM_RENDER_FONTS("Fonts");
+static LLTrace::TimeBlock FTM_RENDER_FONTS("Fonts");
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
ShadowType shadow, S32 max_chars, F32* right_x, BOOL use_ellipses) const
@@ -129,7 +129,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, BOOL use_ellipses) const
{
- LLFastTimer _(FTM_RENDER_FONTS);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_FONTS);
if(!sDisplayFont) //do not display texts
{
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 5d46fb290c..d66b6d8432 100755
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -242,11 +242,11 @@ S32 LLImageGL::dataFormatComponents(S32 dataformat)
//----------------------------------------------------------------------------
-static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_STATS("Image Stats");
+static LLTrace::TimeBlock FTM_IMAGE_UPDATE_STATS("Image Stats");
// static
void LLImageGL::updateStats(F32 current_time)
{
- LLFastTimer t(FTM_IMAGE_UPDATE_STATS);
+ LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE_STATS);
sLastFrameTime = current_time;
sBoundTextureMemory = sCurBoundTextureMemory;
sCurBoundTextureMemory = S32Bytes(0);
@@ -616,10 +616,10 @@ void LLImageGL::setImage(const LLImageRaw* imageraw)
setImage(rawdata, FALSE);
}
-static LLFastTimer::DeclareTimer FTM_SET_IMAGE("setImage");
+static LLTrace::TimeBlock FTM_SET_IMAGE("setImage");
void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
{
- LLFastTimer t(FTM_SET_IMAGE);
+ LL_RECORD_BLOCK_TIME(FTM_SET_IMAGE);
bool is_compressed = false;
if (mFormatPrimary >= GL_COMPRESSED_RGBA_S3TC_DXT1_EXT && mFormatPrimary <= GL_COMPRESSED_RGBA_S3TC_DXT5_EXT)
{
@@ -671,7 +671,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
}
else
{
-// LLFastTimer t2(FTM_TEMP4);
+// LL_RECORD_BLOCK_TIME(FTM_TEMP4);
if(mFormatSwapBytes)
{
@@ -703,7 +703,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
{
stop_glerror();
{
-// LLFastTimer t2(FTM_TEMP4);
+// LL_RECORD_BLOCK_TIME(FTM_TEMP4);
if(mFormatSwapBytes)
{
@@ -795,7 +795,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
llassert(w > 0 && h > 0 && cur_mip_data);
(void)cur_mip_data;
{
-// LLFastTimer t1(FTM_TEMP4);
+// LL_RECORD_BLOCK_TIME(FTM_TEMP4);
if(mFormatSwapBytes)
{
glPixelStorei(GL_UNPACK_SWAP_BYTES, 1);
@@ -1084,10 +1084,10 @@ BOOL LLImageGL::setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_
}
// static
-static LLFastTimer::DeclareTimer FTM_GENERATE_TEXTURES("generate textures");
+static LLTrace::TimeBlock FTM_GENERATE_TEXTURES("generate textures");
void LLImageGL::generateTextures(LLTexUnit::eTextureType type, U32 format, S32 numTextures, U32 *textures)
{
- LLFastTimer t(FTM_GENERATE_TEXTURES);
+ LL_RECORD_BLOCK_TIME(FTM_GENERATE_TEXTURES);
bool empty = true;
dead_texturelist_t::iterator iter = sDeadTextureList[type].find(format);
@@ -1167,10 +1167,10 @@ void LLImageGL::deleteTextures(LLTexUnit::eTextureType type, U32 format, S32 mip
}
// static
-static LLFastTimer::DeclareTimer FTM_SET_MANUAL_IMAGE("setManualImage");
+static LLTrace::TimeBlock FTM_SET_MANUAL_IMAGE("setManualImage");
void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void *pixels, bool allow_compression)
{
- LLFastTimer t(FTM_SET_MANUAL_IMAGE);
+ LL_RECORD_BLOCK_TIME(FTM_SET_MANUAL_IMAGE);
bool use_scratch = false;
U32* scratch = NULL;
if (LLRender::sGLCoreProfile)
@@ -1274,10 +1274,10 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
//create an empty GL texture: just create a texture name
//the texture is assiciate with some image by calling glTexImage outside LLImageGL
-static LLFastTimer::DeclareTimer FTM_CREATE_GL_TEXTURE1("createGLTexture()");
+static LLTrace::TimeBlock FTM_CREATE_GL_TEXTURE1("createGLTexture()");
BOOL LLImageGL::createGLTexture()
{
- LLFastTimer t(FTM_CREATE_GL_TEXTURE1);
+ LL_RECORD_BLOCK_TIME(FTM_CREATE_GL_TEXTURE1);
if (gGLManager.mIsDisabled)
{
LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL;
@@ -1305,10 +1305,10 @@ BOOL LLImageGL::createGLTexture()
return TRUE ;
}
-static LLFastTimer::DeclareTimer FTM_CREATE_GL_TEXTURE2("createGLTexture(raw)");
+static LLTrace::TimeBlock FTM_CREATE_GL_TEXTURE2("createGLTexture(raw)");
BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename/*=0*/, BOOL to_create, S32 category)
{
- LLFastTimer t(FTM_CREATE_GL_TEXTURE2);
+ LL_RECORD_BLOCK_TIME(FTM_CREATE_GL_TEXTURE2);
if (gGLManager.mIsDisabled)
{
LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL;
@@ -1380,10 +1380,10 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
return createGLTexture(discard_level, rawdata, FALSE, usename);
}
-static LLFastTimer::DeclareTimer FTM_CREATE_GL_TEXTURE3("createGLTexture3(data)");
+static LLTrace::TimeBlock FTM_CREATE_GL_TEXTURE3("createGLTexture3(data)");
BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_hasmips, S32 usename)
{
- LLFastTimer t(FTM_CREATE_GL_TEXTURE3);
+ LL_RECORD_BLOCK_TIME(FTM_CREATE_GL_TEXTURE3);
llassert(data_in);
stop_glerror();
diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp
index 3ac2d0b809..14894c53b4 100644
--- a/indra/llrender/llrender2dutils.cpp
+++ b/indra/llrender/llrender2dutils.cpp
@@ -1062,7 +1062,7 @@ void gl_rect_2d_simple( S32 width, S32 height )
gGL.end();
}
-static LLFastTimer::DeclareTimer FTM_RENDER_SEGMENTED_RECT ("Render segmented rectangle");
+static LLTrace::TimeBlock FTM_RENDER_SEGMENTED_RECT ("Render segmented rectangle");
void gl_segmented_rect_2d_tex(const S32 left,
const S32 top,
@@ -1073,7 +1073,7 @@ void gl_segmented_rect_2d_tex(const S32 left,
const S32 border_size,
const U32 edges)
{
- LLFastTimer _(FTM_RENDER_SEGMENTED_RECT);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_SEGMENTED_RECT);
S32 width = llabs(right - left);
S32 height = llabs(top - bottom);
@@ -1232,7 +1232,7 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
const F32 end_fragment,
const U32 edges)
{
- LLFastTimer _(FTM_RENDER_SEGMENTED_RECT);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_SEGMENTED_RECT);
const S32 left = rect.mLeft;
const S32 right = rect.mRight;
const S32 top = rect.mTop;
@@ -1419,7 +1419,7 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv_rect, const LLRectf& center_draw_rect,
const LLVector3& width_vec, const LLVector3& height_vec)
{
- LLFastTimer _(FTM_RENDER_SEGMENTED_RECT);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_SEGMENTED_RECT);
gGL.begin(LLRender::QUADS);
{
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index ed2ed081e9..b1a5a194be 100755
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -564,10 +564,10 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
}
//static
-static LLFastTimer::DeclareTimer FTM_VB_DRAW_ARRAYS("drawArrays");
+static LLTrace::TimeBlock FTM_VB_DRAW_ARRAYS("drawArrays");
void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos, const std::vector<LLVector3>& norm)
{
- LLFastTimer t(FTM_VB_DRAW_ARRAYS);
+ LL_RECORD_BLOCK_TIME(FTM_VB_DRAW_ARRAYS);
llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShaderPtr != NULL);
gGL.syncMatrices();
@@ -812,7 +812,7 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const
placeFence();
}
-static LLFastTimer::DeclareTimer FTM_GL_DRAW_ARRAYS("GL draw arrays");
+static LLTrace::TimeBlock FTM_GL_DRAW_ARRAYS("GL draw arrays");
void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const
{
llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShaderPtr != NULL);
@@ -848,7 +848,7 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const
}
{
- LLFastTimer t2(FTM_GL_DRAW_ARRAYS);
+ LL_RECORD_BLOCK_TIME(FTM_GL_DRAW_ARRAYS);
stop_glerror();
LLGLSLShader::startProfile();
glDrawArrays(sGLMode[mode], first, count);
@@ -1329,7 +1329,7 @@ void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)
}
}
-static LLFastTimer::DeclareTimer FTM_SETUP_VERTEX_ARRAY("Setup VAO");
+static LLTrace::TimeBlock FTM_SETUP_VERTEX_ARRAY("Setup VAO");
void LLVertexBuffer::setupVertexArray()
{
@@ -1338,7 +1338,7 @@ void LLVertexBuffer::setupVertexArray()
return;
}
- LLFastTimer t(FTM_SETUP_VERTEX_ARRAY);
+ LL_RECORD_BLOCK_TIME(FTM_SETUP_VERTEX_ARRAY);
#if GL_ARB_vertex_array_object
glBindVertexArray(mGLArray);
#endif
@@ -1493,8 +1493,8 @@ bool expand_region(LLVertexBuffer::MappedRegion& region, S32 index, S32 count)
return true;
}
-static LLFastTimer::DeclareTimer FTM_VBO_MAP_BUFFER_RANGE("VBO Map Range");
-static LLFastTimer::DeclareTimer FTM_VBO_MAP_BUFFER("VBO Map");
+static LLTrace::TimeBlock FTM_VBO_MAP_BUFFER_RANGE("VBO Map Range");
+static LLTrace::TimeBlock FTM_VBO_MAP_BUFFER("VBO Map");
// Map for data access
volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range)
@@ -1565,7 +1565,7 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
if (map_range)
{
#ifdef GL_ARB_map_buffer_range
- LLFastTimer t(FTM_VBO_MAP_BUFFER_RANGE);
+ LL_RECORD_BLOCK_TIME(FTM_VBO_MAP_BUFFER_RANGE);
S32 offset = mOffsets[type] + sTypeSize[type]*index;
S32 length = (sTypeSize[type]*count+0xF) & ~0xF;
src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, offset, length,
@@ -1589,7 +1589,7 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
}
}
- LLFastTimer t(FTM_VBO_MAP_BUFFER);
+ LL_RECORD_BLOCK_TIME(FTM_VBO_MAP_BUFFER);
src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, 0, mSize,
GL_MAP_WRITE_BIT |
GL_MAP_FLUSH_EXPLICIT_BIT);
@@ -1675,8 +1675,8 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
}
-static LLFastTimer::DeclareTimer FTM_VBO_MAP_INDEX_RANGE("IBO Map Range");
-static LLFastTimer::DeclareTimer FTM_VBO_MAP_INDEX("IBO Map");
+static LLTrace::TimeBlock FTM_VBO_MAP_INDEX_RANGE("IBO Map Range");
+static LLTrace::TimeBlock FTM_VBO_MAP_INDEX("IBO Map");
volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
{
@@ -1754,7 +1754,7 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
if (map_range)
{
#ifdef GL_ARB_map_buffer_range
- LLFastTimer t(FTM_VBO_MAP_INDEX_RANGE);
+ LL_RECORD_BLOCK_TIME(FTM_VBO_MAP_INDEX_RANGE);
S32 offset = sizeof(U16)*index;
S32 length = sizeof(U16)*count;
src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length,
@@ -1766,7 +1766,7 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
else
{
#ifdef GL_ARB_map_buffer_range
- LLFastTimer t(FTM_VBO_MAP_INDEX);
+ LL_RECORD_BLOCK_TIME(FTM_VBO_MAP_INDEX);
src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, 0, sizeof(U16)*mNumIndices,
GL_MAP_WRITE_BIT |
GL_MAP_FLUSH_EXPLICIT_BIT);
@@ -1790,7 +1790,7 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
}
else
{
- LLFastTimer t(FTM_VBO_MAP_INDEX);
+ LL_RECORD_BLOCK_TIME(FTM_VBO_MAP_INDEX);
map_range = false;
src = (U8*) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
}
@@ -1841,12 +1841,12 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
}
}
-static LLFastTimer::DeclareTimer FTM_VBO_UNMAP("VBO Unmap");
-static LLFastTimer::DeclareTimer FTM_VBO_FLUSH_RANGE("Flush VBO Range");
+static LLTrace::TimeBlock FTM_VBO_UNMAP("VBO Unmap");
+static LLTrace::TimeBlock FTM_VBO_FLUSH_RANGE("Flush VBO Range");
-static LLFastTimer::DeclareTimer FTM_IBO_UNMAP("IBO Unmap");
-static LLFastTimer::DeclareTimer FTM_IBO_FLUSH_RANGE("Flush IBO Range");
+static LLTrace::TimeBlock FTM_IBO_UNMAP("IBO Unmap");
+static LLTrace::TimeBlock FTM_IBO_FLUSH_RANGE("Flush IBO Range");
void LLVertexBuffer::unmapBuffer()
{
@@ -1859,7 +1859,7 @@ void LLVertexBuffer::unmapBuffer()
if (mMappedData && mVertexLocked)
{
- LLFastTimer t(FTM_VBO_UNMAP);
+ LL_RECORD_BLOCK_TIME(FTM_VBO_UNMAP);
bindGLBuffer(true);
updated_all = mIndexLocked; //both vertex and index buffers done updating
@@ -1900,7 +1900,7 @@ void LLVertexBuffer::unmapBuffer()
S32 length = sTypeSize[region.mType]*region.mCount;
if (gGLManager.mHasMapBufferRange)
{
- LLFastTimer t(FTM_VBO_FLUSH_RANGE);
+ LL_RECORD_BLOCK_TIME(FTM_VBO_FLUSH_RANGE);
#ifdef GL_ARB_map_buffer_range
glFlushMappedBufferRange(GL_ARRAY_BUFFER_ARB, offset, length);
#endif
@@ -1930,7 +1930,7 @@ void LLVertexBuffer::unmapBuffer()
if (mMappedIndexData && mIndexLocked)
{
- LLFastTimer t(FTM_IBO_UNMAP);
+ LL_RECORD_BLOCK_TIME(FTM_IBO_UNMAP);
bindGLIndices();
if(!mMappable)
{
@@ -1967,7 +1967,7 @@ void LLVertexBuffer::unmapBuffer()
S32 length = sizeof(U16)*region.mCount;
if (gGLManager.mHasMapBufferRange)
{
- LLFastTimer t(FTM_IBO_FLUSH_RANGE);
+ LL_RECORD_BLOCK_TIME(FTM_IBO_FLUSH_RANGE);
#ifdef GL_ARB_map_buffer_range
glFlushMappedBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length);
#endif
@@ -2111,13 +2111,13 @@ bool LLVertexBuffer::getClothWeightStrider(LLStrider<LLVector4>& strider, S32 in
//----------------------------------------------------------------------------
-static LLFastTimer::DeclareTimer FTM_BIND_GL_ARRAY("Bind Array");
+static LLTrace::TimeBlock FTM_BIND_GL_ARRAY("Bind Array");
bool LLVertexBuffer::bindGLArray()
{
if (mGLArray && sGLRenderArray != mGLArray)
{
{
- LLFastTimer t(FTM_BIND_GL_ARRAY);
+ LL_RECORD_BLOCK_TIME(FTM_BIND_GL_ARRAY);
#if GL_ARB_vertex_array_object
glBindVertexArray(mGLArray);
#endif
@@ -2134,7 +2134,7 @@ bool LLVertexBuffer::bindGLArray()
return false;
}
-static LLFastTimer::DeclareTimer FTM_BIND_GL_BUFFER("Bind Buffer");
+static LLTrace::TimeBlock FTM_BIND_GL_BUFFER("Bind Buffer");
bool LLVertexBuffer::bindGLBuffer(bool force_bind)
{
@@ -2144,7 +2144,7 @@ bool LLVertexBuffer::bindGLBuffer(bool force_bind)
if (useVBOs() && (force_bind || (mGLBuffer && (mGLBuffer != sGLRenderBuffer || !sVBOActive))))
{
- LLFastTimer t(FTM_BIND_GL_BUFFER);
+ LL_RECORD_BLOCK_TIME(FTM_BIND_GL_BUFFER);
/*if (sMapped)
{
LL_ERRS() << "VBO bound while another VBO mapped!" << LL_ENDL;
@@ -2166,7 +2166,7 @@ bool LLVertexBuffer::bindGLBuffer(bool force_bind)
return ret;
}
-static LLFastTimer::DeclareTimer FTM_BIND_GL_INDICES("Bind Indices");
+static LLTrace::TimeBlock FTM_BIND_GL_INDICES("Bind Indices");
bool LLVertexBuffer::bindGLIndices(bool force_bind)
{
@@ -2175,7 +2175,7 @@ bool LLVertexBuffer::bindGLIndices(bool force_bind)
bool ret = false;
if (useVBOs() && (force_bind || (mGLIndices && (mGLIndices != sGLRenderIndices || !sIBOActive))))
{
- LLFastTimer t(FTM_BIND_GL_INDICES);
+ LL_RECORD_BLOCK_TIME(FTM_BIND_GL_INDICES);
/*if (sMapped)
{
LL_ERRS() << "VBO bound while another VBO mapped!" << LL_ENDL;