summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2022-01-13 13:02:37 -0800
committerPtolemy <ptolemy@lindenlab.com>2022-01-14 11:50:21 -0800
commitb41a54e126c0aa0b45321015eca738be0f422aa2 (patch)
tree0cc52a2c88d09a33a8c1f1d4b07d0daf5bd61578
parentb70614bd87414e1eb3206765ec5e0cfb3ba7fab7 (diff)
SL-16606: Add profiler category VERTEX
-rw-r--r--indra/llrender/llvertexbuffer.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 9926447ef8..6338cab96a 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -123,7 +123,7 @@ bool LLVertexBuffer::sPreferStreamDraw = false;
U32 LLVBOPool::genBuffer()
{
- LL_PROFILE_ZONE_SCOPED
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX
if (sNameIdx == 0)
{
@@ -136,7 +136,7 @@ U32 LLVBOPool::genBuffer()
void LLVBOPool::deleteBuffer(U32 name)
{
- LL_PROFILE_ZONE_SCOPED
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX
if (gGLManager.mInited)
{
LLVertexBuffer::unbind();
@@ -159,7 +159,7 @@ LLVBOPool::LLVBOPool(U32 vboUsage, U32 vboType)
U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed)
{
- LL_PROFILE_ZONE_SCOPED
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX
llassert(vbo_block_size(size) == size);
U8* ret = NULL;
@@ -275,12 +275,12 @@ void LLVBOPool::release(U32 name, U8* buffer, U32 size)
void LLVBOPool::seedPool()
{
- LL_PROFILE_ZONE_SCOPED
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX
U32 dummy_name = 0;
if (mFreeList.size() < LL_VBO_POOL_SEED_COUNT)
{
- LL_PROFILE_ZONE_NAMED("VBOPool Resize");
+ LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("VBOPool Resize");
mFreeList.resize(LL_VBO_POOL_SEED_COUNT);
}
@@ -421,7 +421,7 @@ void LLVertexBuffer::releaseVAOName(U32 name)
//static
void LLVertexBuffer::seedPools()
{
- LL_PROFILE_ZONE_SCOPED
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX
sStreamVBOPool.seedPool();
sDynamicVBOPool.seedPool();
sDynamicCopyVBOPool.seedPool();
@@ -470,7 +470,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
//static
void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos)
{
- LL_PROFILE_ZONE_SCOPED;
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
gGL.begin(mode);
for (auto& v : pos)
{
@@ -483,7 +483,7 @@ void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos)
//static
void LLVertexBuffer::drawElements(U32 mode, const LLVector4a* pos, const LLVector2* tc, S32 num_indices, const U16* indicesp)
{
- LL_PROFILE_ZONE_SCOPED;
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
llassert(LLGLSLShader::sCurBoundShaderPtr != NULL);
gGL.syncMatrices();
@@ -699,7 +699,7 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const
void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const
{
- LL_PROFILE_ZONE_SCOPED;
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
llassert(LLGLSLShader::sCurBoundShaderPtr != NULL);
mMappable = false;
gGL.syncMatrices();
@@ -1257,7 +1257,7 @@ void LLVertexBuffer::setupVertexArray()
return;
}
- LL_PROFILE_ZONE_SCOPED;
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
#if GL_ARB_vertex_array_object
glBindVertexArray(mGLArray);
#endif
@@ -1434,7 +1434,7 @@ bool expand_region(LLVertexBuffer::MappedRegion& region, S32 index, S32 count)
// Map for data access
U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range)
{
- LL_PROFILE_ZONE_SCOPED;
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
bindGLBuffer(true);
if (mFinal)
{
@@ -1611,7 +1611,7 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran
U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
{
- LL_PROFILE_ZONE_SCOPED;
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
bindGLIndices(true);
if (mFinal)
{
@@ -1778,10 +1778,10 @@ void LLVertexBuffer::unmapBuffer()
}
bool updated_all = false;
- LL_PROFILE_ZONE_SCOPED;
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
if (mMappedData && mVertexLocked)
{
- LL_PROFILE_ZONE_NAMED("unmapBuffer - vertex");
+ LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("unmapBuffer - vertex");
bindGLBuffer(true);
updated_all = mIndexLocked; //both vertex and index buffers done updating
@@ -1828,7 +1828,7 @@ void LLVertexBuffer::unmapBuffer()
{
if (!mMappedVertexRegions.empty())
{
- LL_PROFILE_ZONE_NAMED("unmapBuffer - flush vertex");
+ LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("unmapBuffer - flush vertex");
for (U32 i = 0; i < mMappedVertexRegions.size(); ++i)
{
const MappedRegion& region = mMappedVertexRegions[i];
@@ -1864,7 +1864,7 @@ void LLVertexBuffer::unmapBuffer()
if (mMappedIndexData && mIndexLocked)
{
- LL_PROFILE_ZONE_NAMED("unmapBuffer - index");
+ LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("unmapBuffer - index");
bindGLIndices();
if(!mMappable)
{
@@ -1910,7 +1910,7 @@ void LLVertexBuffer::unmapBuffer()
{
for (U32 i = 0; i < mMappedIndexRegions.size(); ++i)
{
- LL_PROFILE_ZONE_NAMED("unmapBuffer - flush index");
+ LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("unmapBuffer - flush index");
const MappedRegion& region = mMappedIndexRegions[i];
S32 offset = region.mIndex >= 0 ? sizeof(U16)*region.mIndex : 0;
S32 length = sizeof(U16)*region.mCount;
@@ -2063,7 +2063,7 @@ bool LLVertexBuffer::bindGLArray()
if (mGLArray && sGLRenderArray != mGLArray)
{
{
- LL_PROFILE_ZONE_SCOPED;
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
#if GL_ARB_vertex_array_object
glBindVertexArray(mGLArray);
#endif
@@ -2088,7 +2088,7 @@ bool LLVertexBuffer::bindGLBuffer(bool force_bind)
if (useVBOs() && (force_bind || (mGLBuffer && (mGLBuffer != sGLRenderBuffer || !sVBOActive))))
{
- LL_PROFILE_ZONE_SCOPED;
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
glBindBufferARB(GL_ARRAY_BUFFER_ARB, mGLBuffer);
sGLRenderBuffer = mGLBuffer;
sBindCount++;
@@ -2119,7 +2119,7 @@ bool LLVertexBuffer::bindGLBufferFast()
bool LLVertexBuffer::bindGLIndices(bool force_bind)
{
- LL_PROFILE_ZONE_SCOPED;
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
bindGLArray();
bool ret = false;