summaryrefslogtreecommitdiff
path: root/indra/llrender/llvertexbuffer.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-07-09 02:28:34 -0500
committerDave Parks <davep@lindenlab.com>2011-07-09 02:28:34 -0500
commitf1443579b32cf260e7ad35f35de3930f0f801bd2 (patch)
treeeba8949b8dd71832297a0836be58cf2d4c71d830 /indra/llrender/llvertexbuffer.cpp
parent36a05ebd9a2a969bab4621f522a9a82f69e523d7 (diff)
SH-2038 Potential fix for a myriad of performance problems concering VBO usage.
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r--indra/llrender/llvertexbuffer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 4a0b964e61..6c972647f8 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -1008,6 +1008,7 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran
LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES);
setBuffer(0, type);
mVertexLocked = TRUE;
+ sMappedCount++;
stop_glerror();
if(sDisableVBOMapping)
@@ -1082,7 +1083,6 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran
llerrs << "memory allocation for vertex data failed." << llendl ;
}
}
- sMappedCount++;
}
}
else
@@ -1152,6 +1152,7 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
setBuffer(0, TYPE_INDEX);
mIndexLocked = TRUE;
+ sMappedCount++;
stop_glerror();
if(sDisableVBOMapping)
@@ -1211,8 +1212,6 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
llerrs << "memory allocation for Index data failed. " << llendl ;
}
}
-
- sMappedCount++;
}
else
{