Add more improvements to usability of memory profiler
This commit is contained in:
@@ -400,6 +400,7 @@ void Foliage::DrawClusterGlobalSA(GlobalSurfaceAtlasPass* globalSA, const Vector
|
||||
void Foliage::DrawFoliageJob(int32 i)
|
||||
{
|
||||
PROFILE_CPU();
|
||||
PROFILE_MEM(Graphics);
|
||||
const FoliageType& type = FoliageTypes[i];
|
||||
if (type.IsReady() && type.Model->CanBeRendered())
|
||||
{
|
||||
@@ -551,6 +552,7 @@ FoliageType* Foliage::GetFoliageType(int32 index)
|
||||
void Foliage::AddFoliageType(Model* model)
|
||||
{
|
||||
PROFILE_CPU();
|
||||
PROFILE_MEM(LevelFoliage);
|
||||
|
||||
// Ensure to have unique model
|
||||
CHECK(model);
|
||||
@@ -629,6 +631,7 @@ int32 Foliage::GetFoliageTypeInstancesCount(int32 index) const
|
||||
|
||||
void Foliage::AddInstance(const FoliageInstance& instance)
|
||||
{
|
||||
PROFILE_MEM(LevelFoliage);
|
||||
ASSERT(instance.Type >= 0 && instance.Type < FoliageTypes.Count());
|
||||
auto type = &FoliageTypes[instance.Type];
|
||||
|
||||
@@ -705,6 +708,7 @@ void Foliage::OnFoliageTypeModelLoaded(int32 index)
|
||||
if (_disableFoliageTypeEvents)
|
||||
return;
|
||||
PROFILE_CPU();
|
||||
PROFILE_MEM(LevelFoliage);
|
||||
auto& type = FoliageTypes[index];
|
||||
ASSERT(type.IsReady());
|
||||
|
||||
@@ -803,6 +807,7 @@ void Foliage::OnFoliageTypeModelLoaded(int32 index)
|
||||
void Foliage::RebuildClusters()
|
||||
{
|
||||
PROFILE_CPU();
|
||||
PROFILE_MEM(LevelFoliage);
|
||||
|
||||
// Faster path if foliage is empty or no types is ready
|
||||
bool anyTypeReady = false;
|
||||
@@ -1328,6 +1333,7 @@ void Foliage::Deserialize(DeserializeStream& stream, ISerializeModifier* modifie
|
||||
Actor::Deserialize(stream, modifier);
|
||||
|
||||
PROFILE_CPU();
|
||||
PROFILE_MEM(LevelFoliage);
|
||||
|
||||
// Clear
|
||||
#if FOLIAGE_USE_SINGLE_QUAD_TREE
|
||||
|
||||
Reference in New Issue
Block a user