mirror of
https://github.com/overte-org/overte.git
synced 2025-04-17 08:56:36 +02:00
Cleaning up the stats.qml
This commit is contained in:
parent
88c58cc276
commit
d746fba142
5 changed files with 32 additions and 11 deletions
|
@ -80,11 +80,6 @@ Item {
|
|||
label: "GPU",
|
||||
color: "#1AC567"
|
||||
},
|
||||
{
|
||||
prop: "frameTextureCount",
|
||||
label: "Frame",
|
||||
color: "#E2334D"
|
||||
},
|
||||
{
|
||||
prop: "textureGPUTransferCount",
|
||||
label: "Transfer",
|
||||
|
@ -114,13 +109,7 @@ Item {
|
|||
prop: "textureGPUVirtualMemoryUsage",
|
||||
label: "GPU Virtual",
|
||||
color: "#9495FF"
|
||||
},
|
||||
{
|
||||
prop: "frameTextureMemoryUsage",
|
||||
label: "Frame",
|
||||
color: "#E2334D"
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -170,6 +159,24 @@ Item {
|
|||
]
|
||||
}
|
||||
|
||||
PlotPerf {
|
||||
title: "State Changes"
|
||||
height: parent.evalEvenHeight()
|
||||
object: stats.config
|
||||
plots: [
|
||||
{
|
||||
prop: "frameTextureCount",
|
||||
label: "Textures",
|
||||
color: "#00B4EF"
|
||||
},
|
||||
{
|
||||
prop: "frameSetPipelineCount",
|
||||
label: "Pipelines",
|
||||
color: "#E2334D"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
property var drawOpaqueConfig: Render.getConfig("DrawOpaqueDeferred")
|
||||
property var drawTransparentConfig: Render.getConfig("DrawTransparentDeferred")
|
||||
property var drawLightConfig: Render.getConfig("DrawLight")
|
||||
|
|
|
@ -39,6 +39,8 @@ public:
|
|||
int _DSNumAPIDrawcalls = 0;
|
||||
int _DSNumDrawcalls = 0;
|
||||
int _DSNumTriangles = 0;
|
||||
|
||||
int _PSNumSetPipelines = 0;
|
||||
|
||||
ContextStats() {}
|
||||
ContextStats(const ContextStats& stats) = default;
|
||||
|
|
|
@ -64,6 +64,9 @@ void GLBackend::do_setPipeline(Batch& batch, size_t paramOffset) {
|
|||
return;
|
||||
}
|
||||
|
||||
// A true new Pipeline
|
||||
_stats._PSNumSetPipelines++;
|
||||
|
||||
// null pipeline == reset
|
||||
if (!pipeline) {
|
||||
_pipeline._pipeline.reset();
|
||||
|
|
|
@ -49,5 +49,7 @@ void EngineStats::run(const SceneContextPointer& sceneContext, const RenderConte
|
|||
config->frameTextureRate = config->frameTextureCount * frequency;
|
||||
config->frameTextureMemoryUsage = _gpuStats._RSAmountTextureMemoryBounded - gpuStats._RSAmountTextureMemoryBounded;
|
||||
|
||||
config->frameSetPipelineCount = _gpuStats._PSNumSetPipelines - gpuStats._PSNumSetPipelines;
|
||||
|
||||
config->emitDirty();
|
||||
}
|
||||
|
|
|
@ -47,6 +47,9 @@ namespace render {
|
|||
Q_PROPERTY(quint32 frameTextureRate MEMBER frameTextureRate NOTIFY dirty)
|
||||
Q_PROPERTY(quint32 frameTextureMemoryUsage MEMBER frameTextureMemoryUsage NOTIFY dirty)
|
||||
|
||||
Q_PROPERTY(quint32 frameSetPipelineCount MEMBER frameSetPipelineCount NOTIFY dirty)
|
||||
|
||||
|
||||
public:
|
||||
EngineStatsConfig() : Job::Config(true) {}
|
||||
|
||||
|
@ -73,6 +76,10 @@ namespace render {
|
|||
quint32 frameTextureRate{ 0 };
|
||||
qint64 frameTextureMemoryUsage{ 0 };
|
||||
|
||||
quint32 frameSetPipelineCount{ 0 };
|
||||
|
||||
|
||||
|
||||
void emitDirty() { emit dirty(); }
|
||||
|
||||
signals:
|
||||
|
|
Loading…
Reference in a new issue