This commit is contained in:
Shyotl
2017-03-14 04:02:53 -05:00
parent 4a9ff22eeb
commit f4a713a500
99 changed files with 1010 additions and 989 deletions

View File

@@ -108,9 +108,9 @@ S32 LLVOVolume::mRenderComplexity_current = 0;
LLPointer<LLObjectMediaDataClient> LLVOVolume::sObjectMediaClient = NULL;
LLPointer<LLObjectMediaNavigateClient> LLVOVolume::sObjectMediaNavigateClient = NULL;
static LLFastTimer::DeclareTimer FTM_GEN_TRIANGLES("Generate Triangles");
static LLFastTimer::DeclareTimer FTM_GEN_VOLUME("Generate Volumes");
static LLFastTimer::DeclareTimer FTM_VOLUME_TEXTURES("Volume Textures");
static LLTrace::BlockTimerStatHandle FTM_GEN_TRIANGLES("Generate Triangles");
static LLTrace::BlockTimerStatHandle FTM_GEN_VOLUME("Generate Volumes");
static LLTrace::BlockTimerStatHandle FTM_VOLUME_TEXTURES("Volume Textures");
// Implementation class of LLMediaDataClientObject. See llmediadataclient.h
class LLMediaDataClientObjectImpl : public LLMediaDataClientObject
@@ -677,7 +677,7 @@ BOOL LLVOVolume::isVisible() const
void LLVOVolume::updateTextureVirtualSize(bool forced)
{
LLFastTimer ftm(FTM_VOLUME_TEXTURES);
LL_RECORD_BLOCK_TIME(FTM_VOLUME_TEXTURES);
// Update the pixel area of all faces
if(mDrawable.isNull())
@@ -1562,9 +1562,9 @@ void LLVOVolume::updateRelativeXform(bool force_identity)
}
}
static LLFastTimer::DeclareTimer FTM_GEN_FLEX("Generate Flexies");
static LLFastTimer::DeclareTimer FTM_UPDATE_PRIMITIVES("Update Primitives");
static LLFastTimer::DeclareTimer FTM_UPDATE_RIGGED_VOLUME("Update Rigged");
static LLTrace::BlockTimerStatHandle FTM_GEN_FLEX("Generate Flexies");
static LLTrace::BlockTimerStatHandle FTM_UPDATE_PRIMITIVES("Update Primitives");
static LLTrace::BlockTimerStatHandle FTM_UPDATE_RIGGED_VOLUME("Update Rigged");
bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable)
{
@@ -1580,7 +1580,7 @@ bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable)
old_volumep = NULL ;
{
LLFastTimer ftm(FTM_GEN_VOLUME);
LL_RECORD_BLOCK_TIME(FTM_GEN_VOLUME);
const LLVolumeParams &volume_params = getVolume()->getParams();
setVolume(volume_params, 0);
}
@@ -1602,7 +1602,7 @@ bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable)
drawable->setState(LLDrawable::REBUILD_VOLUME); // for face->genVolumeTriangles()
{
LLFastTimer t(FTM_GEN_TRIANGLES);
LL_RECORD_BLOCK_TIME(FTM_GEN_TRIANGLES);
regen_faces = new_num_faces != old_num_faces || mNumFaces != (S32)getNumTEs();
if (regen_faces)
{
@@ -1627,12 +1627,12 @@ bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable)
BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
{
LLFastTimer t(FTM_UPDATE_PRIMITIVES);
LL_RECORD_BLOCK_TIME(FTM_UPDATE_PRIMITIVES);
if (mDrawable->isState(LLDrawable::REBUILD_RIGGED))
{
{
LLFastTimer t(FTM_UPDATE_RIGGED_VOLUME);
LL_RECORD_BLOCK_TIME(FTM_UPDATE_RIGGED_VOLUME);
updateRiggedVolume();
}
genBBoxes(FALSE);
@@ -1643,7 +1643,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
{
BOOL res;
{
LLFastTimer t(FTM_GEN_FLEX);
LL_RECORD_BLOCK_TIME(FTM_GEN_FLEX);
res = mVolumeImpl->doUpdateGeometry(drawable);
}
updateFaceFlags();
@@ -1680,7 +1680,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
}
if (!was_regen_faces) {
LLFastTimer t(FTM_GEN_TRIANGLES);
LL_RECORD_BLOCK_TIME(FTM_GEN_TRIANGLES);
regenFaces();
}
@@ -1697,7 +1697,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
else
{
// All it did was move or we changed the texture coordinate offset
LLFastTimer t(FTM_GEN_TRIANGLES);
LL_RECORD_BLOCK_TIME(FTM_GEN_TRIANGLES);
genBBoxes(FALSE);
}
@@ -4074,8 +4074,8 @@ void LLVOVolume::updateRiggedVolume(bool force_update)
}
static LLFastTimer::DeclareTimer FTM_SKIN_RIGGED("Skin");
static LLFastTimer::DeclareTimer FTM_RIGGED_OCTREE("Octree");
static LLTrace::BlockTimerStatHandle FTM_SKIN_RIGGED("Skin");
static LLTrace::BlockTimerStatHandle FTM_RIGGED_OCTREE("Octree");
void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, const LLVolume* volume)
{
@@ -4132,7 +4132,7 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
if( pos && dst_face.mExtents )
{
LLFastTimer t(FTM_SKIN_RIGGED);
LL_RECORD_BLOCK_TIME(FTM_SKIN_RIGGED);
U32 max_joints = LLSkinningUtil::getMaxJointCount();
for (U32 j = 0; j < (U32)dst_face.mNumVertices; ++j)
@@ -4169,7 +4169,7 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
}
{
LLFastTimer t(FTM_RIGGED_OCTREE);
LL_RECORD_BLOCK_TIME(FTM_RIGGED_OCTREE);
delete dst_face.mOctree;
dst_face.mOctree = NULL;
@@ -4335,11 +4335,11 @@ void LLVolumeGeometryManager::freeFaces()
sAlphaFaces = NULL;
}
static LLFastTimer::DeclareTimer FTM_REGISTER_FACE("Register Face");
static LLTrace::BlockTimerStatHandle FTM_REGISTER_FACE("Register Face");
void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U32 type)
{
LLFastTimer t(FTM_REGISTER_FACE);
LL_RECORD_BLOCK_TIME(FTM_REGISTER_FACE);
//if (type == LLRenderPass::PASS_ALPHA && facep->getTextureEntry()->getMaterialParams().notNull() && !facep->getVertexBuffer()->hasDataType(LLVertexBuffer::TYPE_TANGENT))
//{
// LL_WARNS("RenderMaterials") << "Oh no! No binormals for this alpha blended face!" << LL_ENDL;
@@ -4599,9 +4599,9 @@ void LLVolumeGeometryManager::getGeometry(LLSpatialGroup* group)
}
static LLFastTimer::DeclareTimer FTM_REBUILD_VOLUME_VB("Volume VB");
static LLFastTimer::DeclareTimer FTM_REBUILD_VOLUME_FACE_LIST("Build Face List");
static LLFastTimer::DeclareTimer FTM_REBUILD_VOLUME_GEN_DRAW_INFO("Gen Draw Info");
static LLTrace::BlockTimerStatHandle FTM_REBUILD_VOLUME_VB("Volume VB");
static LLTrace::BlockTimerStatHandle FTM_REBUILD_VOLUME_FACE_LIST("Build Face List");
static LLTrace::BlockTimerStatHandle FTM_REBUILD_VOLUME_GEN_DRAW_INFO("Gen Draw Info");
static LLDrawPoolAvatar* get_avatar_drawpool(LLViewerObject* vobj)
{
@@ -4653,7 +4653,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
return;
}
LLFastTimer ftm(FTM_REBUILD_VOLUME_VB);
LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_VB);
group->mBuilt = 1.f;
@@ -4711,7 +4711,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
bool emissive = false;
{
LLFastTimer t(FTM_REBUILD_VOLUME_FACE_LIST);
LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_FACE_LIST);
//get all the faces into a list
OctreeGuard guard(group->getOctreeNode());
@@ -5476,8 +5476,8 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
static int warningsCount = 20;
if (group && group->hasState(LLSpatialGroup::MESH_DIRTY) && !group->hasState(LLSpatialGroup::GEOM_DIRTY))
{
LLFastTimer ftm(FTM_REBUILD_VOLUME_VB);
LLFastTimer t(FTM_REBUILD_VOLUME_GEN_DRAW_INFO); //make sure getgeometryvolume shows up in the right place in timers
LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_VB);
LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_GEN_DRAW_INFO); //make sure getgeometryvolume shows up in the right place in timers
group->mBuilt = 1.f;
@@ -5667,11 +5667,11 @@ struct CompareBatchBreakerModified
}
};
static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_SORT("Draw Info Face Sort");
static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_FACE_SIZE("Face Sizing");
static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_ALLOCATE("Allocate VB");
static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_FIND_VB("Find VB");
static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_RESIZE_VB("Resize VB");
static LLTrace::BlockTimerStatHandle FTM_GEN_DRAW_INFO_SORT("Draw Info Face Sort");
static LLTrace::BlockTimerStatHandle FTM_GEN_DRAW_INFO_FACE_SIZE("Face Sizing");
static LLTrace::BlockTimerStatHandle FTM_GEN_DRAW_INFO_ALLOCATE("Allocate VB");
static LLTrace::BlockTimerStatHandle FTM_GEN_DRAW_INFO_FIND_VB("Find VB");
static LLTrace::BlockTimerStatHandle FTM_GEN_DRAW_INFO_RESIZE_VB("Resize VB");
@@ -5679,7 +5679,7 @@ static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_RESIZE_VB("Resize VB");
void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, BOOL distance_sort, BOOL batch_textures)
{
LLFastTimer t(FTM_REBUILD_VOLUME_GEN_DRAW_INFO);
LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_GEN_DRAW_INFO);
U32 buffer_usage = group->mBufferUsage;
@@ -5700,7 +5700,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
max_vertices = llmin(max_vertices, (U32) 65535);
{
LLFastTimer t(FTM_GEN_DRAW_INFO_SORT);
LL_RECORD_BLOCK_TIME(FTM_GEN_DRAW_INFO_SORT);
if (!distance_sort)
{
//sort faces by things that break batches
@@ -5758,7 +5758,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
U32 texture_count = 0;
{
LLFastTimer t(FTM_GEN_DRAW_INFO_FACE_SIZE);
LL_RECORD_BLOCK_TIME(FTM_GEN_DRAW_INFO_FACE_SIZE);
if (batch_textures)
{
U8 cur_tex = 0;
@@ -5871,7 +5871,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
}
else
{
LLFastTimer t(FTM_GEN_DRAW_INFO_FACE_SIZE);
LL_RECORD_BLOCK_TIME(FTM_GEN_DRAW_INFO_FACE_SIZE);
if (batch_textures)
{
@@ -6004,7 +6004,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
LLVertexBuffer* buffer = NULL;
{
LLFastTimer t(FTM_GEN_DRAW_INFO_ALLOCATE);
LL_RECORD_BLOCK_TIME(FTM_GEN_DRAW_INFO_ALLOCATE);
buffer = createVertexBuffer(mask, buffer_usage);
buffer->allocateBuffer(geom_count, index_count, TRUE);
}