SL-18391 Basic gltf material accounting

Plan is to expand it as needed with overrides, request rate and memory
master
Andrey Kleshchev 2022-11-11 22:45:42 +02:00
parent 7c67777680
commit cdf248d986
4 changed files with 14 additions and 0 deletions

View File

@ -37,6 +37,7 @@
#include "llviewercontrol.h"
#include "llviewergenericmessage.h"
#include "llviewerobjectlist.h"
#include "llviewerstats.h"
#include "llcorehttputil.h"
#include "llagent.h"
@ -626,6 +627,11 @@ void LLGLTFMaterialList::flushMaterials()
{
mLastUpdateKey.setNull();
}
{
using namespace LLStatViewer;
sample(NUM_MATERIALS, mList.size());
}
}
// static

View File

@ -139,6 +139,7 @@ SimMeasurement<LLUnit<F64, LLUnits::Percent> >
LLTrace::SampleStatHandle<> FPS_SAMPLE("fpssample"),
NUM_IMAGES("numimagesstat"),
NUM_RAW_IMAGES("numrawimagesstat"),
NUM_MATERIALS("nummaterials"),
NUM_OBJECTS("numobjectsstat"),
NUM_ACTIVE_OBJECTS("numactiveobjectsstat"),
ENABLE_VBO("enablevbo", "Vertex Buffers Enabled"),

View File

@ -180,6 +180,7 @@ extern LLTrace::SampleStatHandle<> FPS_SAMPLE,
NUM_IMAGES,
NUM_RAW_IMAGES,
NUM_OBJECTS,
NUM_MATERIALS,
NUM_ACTIVE_OBJECTS,
ENABLE_VBO,
LIGHTING_DETAIL,

View File

@ -133,6 +133,12 @@
label="Bound Mem"
stat="glboundmemstat"/>
</stat_view>
<stat_view name="material"
label="Material">
<stat_bar name="nummaterials"
label="Count"
stat="nummaterials"/>
</stat_view>
<stat_view name="memory"
label="Memory Usage">
<stat_bar name="LLTrace"