mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 17:00:13 +02:00
Consolidate stats for opaque/transparent/other
This commit is contained in:
parent
965d6bb006
commit
7804ee22d4
7 changed files with 34 additions and 76 deletions
|
@ -186,42 +186,29 @@ Item {
|
||||||
color: root.fontColor;
|
color: root.fontColor;
|
||||||
font.pixelSize: root.fontSize
|
font.pixelSize: root.fontSize
|
||||||
visible: root.expanded;
|
visible: root.expanded;
|
||||||
text: "\tItems Rendered Opaque: " + root.opaqueRendered +
|
text: "Items rendered / considered: " +
|
||||||
" / Translucent: " + root.translucentRendered +
|
root.itemRendered + " / " + root.itemConsidered;
|
||||||
" / Shadow: " + root.shadowRendered +
|
|
||||||
" / Other: " + root.otherRendered;
|
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
color: root.fontColor;
|
color: root.fontColor;
|
||||||
font.pixelSize: root.fontSize
|
font.pixelSize: root.fontSize
|
||||||
visible: root.expanded;
|
visible: root.expanded;
|
||||||
text: "\tOpaque considered: " + root.opaqueConsidered +
|
text: " out of view: " + root.itemOutOfView +
|
||||||
" / Out of view: " + root.opaqueOutOfView +
|
" too small: " + root.itemTooSmall;
|
||||||
" / Too small: " + root.opaqueTooSmall;
|
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
color: root.fontColor;
|
color: root.fontColor;
|
||||||
font.pixelSize: root.fontSize
|
font.pixelSize: root.fontSize
|
||||||
visible: root.expanded;
|
visible: root.expanded;
|
||||||
text: "\tShadow considered: " + root.shadowConsidered +
|
text: "Shadows rendered / considered: " +
|
||||||
" / Out of view: " + root.shadowOutOfView +
|
root.shadowRendered + " / " + root.shadowConsidered;
|
||||||
" / Too small: " + root.shadowTooSmall;
|
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
color: root.fontColor;
|
color: root.fontColor;
|
||||||
font.pixelSize: root.fontSize
|
font.pixelSize: root.fontSize
|
||||||
visible: root.expanded;
|
visible: root.expanded;
|
||||||
text: "\tTranslucent considered: " + root.translucentConsidered +
|
text: " out of view: " + root.shadowOutOfView +
|
||||||
" / Out of view: " + root.translucentOutOfView +
|
" too small: " + root.shadowTooSmall;
|
||||||
" / Too small: " + root.translucentTooSmall;
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
color: root.fontColor;
|
|
||||||
font.pixelSize: root.fontSize
|
|
||||||
visible: root.expanded;
|
|
||||||
text: "\tOther considered: " + root.otherConsidered +
|
|
||||||
" / Out of view: " + root.otherOutOfView +
|
|
||||||
" / Too small: " + root.otherTooSmall;
|
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
color: root.fontColor;
|
color: root.fontColor;
|
||||||
|
|
|
@ -342,22 +342,14 @@ void Stats::setRenderDetails(const RenderDetails& details) {
|
||||||
STAT_UPDATE(triangles, details._trianglesRendered);
|
STAT_UPDATE(triangles, details._trianglesRendered);
|
||||||
STAT_UPDATE(materialSwitches, details._materialSwitches);
|
STAT_UPDATE(materialSwitches, details._materialSwitches);
|
||||||
if (_expanded) {
|
if (_expanded) {
|
||||||
STAT_UPDATE(opaqueConsidered, (int)details._opaque._considered);
|
STAT_UPDATE(itemConsidered, details._item._considered);
|
||||||
STAT_UPDATE(opaqueOutOfView, details._opaque._outOfView);
|
STAT_UPDATE(itemOutOfView, details._item._outOfView);
|
||||||
STAT_UPDATE(opaqueTooSmall, details._opaque._tooSmall);
|
STAT_UPDATE(itemTooSmall, details._item._tooSmall);
|
||||||
STAT_UPDATE(opaqueRendered, (int)details._opaque._rendered);
|
STAT_UPDATE(itemRendered, details._item._rendered);
|
||||||
STAT_UPDATE(shadowConsidered, (int)details._shadow._considered);
|
STAT_UPDATE(shadowConsidered, details._shadow._considered);
|
||||||
STAT_UPDATE(shadowOutOfView, details._shadow._outOfView);
|
STAT_UPDATE(shadowOutOfView, details._shadow._outOfView);
|
||||||
STAT_UPDATE(shadowTooSmall, details._shadow._tooSmall);
|
STAT_UPDATE(shadowTooSmall, details._shadow._tooSmall);
|
||||||
STAT_UPDATE(shadowRendered, (int)details._shadow._rendered);
|
STAT_UPDATE(shadowRendered, details._shadow._rendered);
|
||||||
STAT_UPDATE(translucentConsidered, (int)details._translucent._considered);
|
|
||||||
STAT_UPDATE(translucentOutOfView, details._translucent._outOfView);
|
|
||||||
STAT_UPDATE(translucentTooSmall, details._translucent._tooSmall);
|
|
||||||
STAT_UPDATE(translucentRendered, (int)details._translucent._rendered);
|
|
||||||
STAT_UPDATE(otherConsidered, (int)details._other._considered);
|
|
||||||
STAT_UPDATE(otherOutOfView, details._other._outOfView);
|
|
||||||
STAT_UPDATE(otherTooSmall, details._other._tooSmall);
|
|
||||||
STAT_UPDATE(otherRendered, (int)details._other._rendered);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,22 +59,14 @@ class Stats : public QQuickItem {
|
||||||
STATS_PROPERTY(int, triangles, 0)
|
STATS_PROPERTY(int, triangles, 0)
|
||||||
STATS_PROPERTY(int, quads, 0)
|
STATS_PROPERTY(int, quads, 0)
|
||||||
STATS_PROPERTY(int, materialSwitches, 0)
|
STATS_PROPERTY(int, materialSwitches, 0)
|
||||||
STATS_PROPERTY(int, opaqueConsidered, 0)
|
STATS_PROPERTY(int, itemConsidered, 0)
|
||||||
STATS_PROPERTY(int, opaqueOutOfView, 0)
|
STATS_PROPERTY(int, itemOutOfView, 0)
|
||||||
STATS_PROPERTY(int, opaqueTooSmall, 0)
|
STATS_PROPERTY(int, itemTooSmall, 0)
|
||||||
STATS_PROPERTY(int, opaqueRendered, 0)
|
STATS_PROPERTY(int, itemRendered, 0)
|
||||||
STATS_PROPERTY(int, shadowConsidered, 0)
|
STATS_PROPERTY(int, shadowConsidered, 0)
|
||||||
STATS_PROPERTY(int, shadowOutOfView, 0)
|
STATS_PROPERTY(int, shadowOutOfView, 0)
|
||||||
STATS_PROPERTY(int, shadowTooSmall, 0)
|
STATS_PROPERTY(int, shadowTooSmall, 0)
|
||||||
STATS_PROPERTY(int, shadowRendered, 0)
|
STATS_PROPERTY(int, shadowRendered, 0)
|
||||||
STATS_PROPERTY(int, translucentConsidered, 0)
|
|
||||||
STATS_PROPERTY(int, translucentOutOfView, 0)
|
|
||||||
STATS_PROPERTY(int, translucentTooSmall, 0)
|
|
||||||
STATS_PROPERTY(int, translucentRendered, 0)
|
|
||||||
STATS_PROPERTY(int, otherConsidered, 0)
|
|
||||||
STATS_PROPERTY(int, otherOutOfView, 0)
|
|
||||||
STATS_PROPERTY(int, otherTooSmall, 0)
|
|
||||||
STATS_PROPERTY(int, otherRendered, 0)
|
|
||||||
STATS_PROPERTY(QString, sendingMode, QString())
|
STATS_PROPERTY(QString, sendingMode, QString())
|
||||||
STATS_PROPERTY(QString, packetStats, QString())
|
STATS_PROPERTY(QString, packetStats, QString())
|
||||||
STATS_PROPERTY(QString, lodStatus, QString())
|
STATS_PROPERTY(QString, lodStatus, QString())
|
||||||
|
@ -145,22 +137,14 @@ signals:
|
||||||
void trianglesChanged();
|
void trianglesChanged();
|
||||||
void quadsChanged();
|
void quadsChanged();
|
||||||
void materialSwitchesChanged();
|
void materialSwitchesChanged();
|
||||||
void opaqueConsideredChanged();
|
void itemConsideredChanged();
|
||||||
void opaqueOutOfViewChanged();
|
void itemOutOfViewChanged();
|
||||||
void opaqueTooSmallChanged();
|
void itemTooSmallChanged();
|
||||||
void opaqueRenderedChanged();
|
void itemRenderedChanged();
|
||||||
void shadowConsideredChanged();
|
void shadowConsideredChanged();
|
||||||
void shadowOutOfViewChanged();
|
void shadowOutOfViewChanged();
|
||||||
void shadowTooSmallChanged();
|
void shadowTooSmallChanged();
|
||||||
void shadowRenderedChanged();
|
void shadowRenderedChanged();
|
||||||
void translucentConsideredChanged();
|
|
||||||
void translucentOutOfViewChanged();
|
|
||||||
void translucentTooSmallChanged();
|
|
||||||
void translucentRenderedChanged();
|
|
||||||
void otherConsideredChanged();
|
|
||||||
void otherOutOfViewChanged();
|
|
||||||
void otherTooSmallChanged();
|
|
||||||
void otherRenderedChanged();
|
|
||||||
void sendingModeChanged();
|
void sendingModeChanged();
|
||||||
void packetStatsChanged();
|
void packetStatsChanged();
|
||||||
void lodStatusChanged();
|
void lodStatusChanged();
|
||||||
|
|
|
@ -56,7 +56,7 @@ RenderDeferredTask::RenderDeferredTask(CullFunctor cullFunctor) {
|
||||||
// Fetch and cull the items from the scene
|
// Fetch and cull the items from the scene
|
||||||
auto sceneFilter = ItemFilter::Builder::visibleWorldItems().withoutLayered();
|
auto sceneFilter = ItemFilter::Builder::visibleWorldItems().withoutLayered();
|
||||||
const auto sceneSelection = addJob<FetchSpatialTree>("FetchSceneSelection", sceneFilter);
|
const auto sceneSelection = addJob<FetchSpatialTree>("FetchSceneSelection", sceneFilter);
|
||||||
const auto culledSceneSelection = addJob<CullSpatialSelection>("CullSceneSelection", sceneSelection, cullFunctor, RenderDetails::OPAQUE_ITEM, sceneFilter);
|
const auto culledSceneSelection = addJob<CullSpatialSelection>("CullSceneSelection", sceneSelection, cullFunctor, RenderDetails::ITEM, sceneFilter);
|
||||||
|
|
||||||
// Multi filter visible items into different buckets
|
// Multi filter visible items into different buckets
|
||||||
const int NUM_FILTERS = 3;
|
const int NUM_FILTERS = 3;
|
||||||
|
|
|
@ -108,7 +108,7 @@ RenderShadowTask::RenderShadowTask(CullFunctor cullFunctor) : Task(std::make_sha
|
||||||
const auto fetchedItems = addJob<FetchItems>("FetchShadowMap");
|
const auto fetchedItems = addJob<FetchItems>("FetchShadowMap");
|
||||||
|
|
||||||
// CPU: Cull against KeyLight frustum (nearby viewing camera)
|
// CPU: Cull against KeyLight frustum (nearby viewing camera)
|
||||||
const auto culledItems = addJob<CullItems<RenderDetails::SHADOW_ITEM>>("CullShadowMap", fetchedItems, cullFunctor);
|
const auto culledItems = addJob<CullItems<RenderDetails::SHADOW>>("CullShadowMap", fetchedItems, cullFunctor);
|
||||||
|
|
||||||
// CPU: Sort by pipeline
|
// CPU: Sort by pipeline
|
||||||
const auto sortedShapes = addJob<PipelineSortShapes>("PipelineSortShadowSort", culledItems);
|
const auto sortedShapes = addJob<PipelineSortShapes>("PipelineSortShadowSort", culledItems);
|
||||||
|
|
|
@ -138,7 +138,7 @@ namespace render {
|
||||||
_cullFunctor{ cullFunctor } {}
|
_cullFunctor{ cullFunctor } {}
|
||||||
|
|
||||||
CullFunctor _cullFunctor;
|
CullFunctor _cullFunctor;
|
||||||
RenderDetails::Type _detailType{ RenderDetails::OPAQUE_ITEM };
|
RenderDetails::Type _detailType{ RenderDetails::OTHER };
|
||||||
ItemFilter _filter{ ItemFilter::Builder::opaqueShape().withoutLayered() };
|
ItemFilter _filter{ ItemFilter::Builder::opaqueShape().withoutLayered() };
|
||||||
|
|
||||||
void configure(const Config& config);
|
void configure(const Config& config);
|
||||||
|
|
|
@ -35,36 +35,31 @@ class ShapePipeline;
|
||||||
class RenderDetails {
|
class RenderDetails {
|
||||||
public:
|
public:
|
||||||
enum Type {
|
enum Type {
|
||||||
OPAQUE_ITEM,
|
ITEM,
|
||||||
SHADOW_ITEM,
|
SHADOW,
|
||||||
TRANSLUCENT_ITEM,
|
OTHER
|
||||||
OTHER_ITEM
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Item {
|
struct Item {
|
||||||
size_t _considered = 0;
|
int _considered = 0;
|
||||||
size_t _rendered = 0;
|
|
||||||
int _outOfView = 0;
|
int _outOfView = 0;
|
||||||
int _tooSmall = 0;
|
int _tooSmall = 0;
|
||||||
|
int _rendered = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
int _materialSwitches = 0;
|
int _materialSwitches = 0;
|
||||||
int _trianglesRendered = 0;
|
int _trianglesRendered = 0;
|
||||||
|
|
||||||
Item _opaque;
|
Item _item;
|
||||||
Item _shadow;
|
Item _shadow;
|
||||||
Item _translucent;
|
|
||||||
Item _other;
|
Item _other;
|
||||||
|
|
||||||
Item& edit(Type type) {
|
Item& edit(Type type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case OPAQUE_ITEM:
|
case SHADOW:
|
||||||
return _opaque;
|
|
||||||
case SHADOW_ITEM:
|
|
||||||
return _shadow;
|
return _shadow;
|
||||||
case TRANSLUCENT_ITEM:
|
case ITEM:
|
||||||
return _translucent;
|
return _item;
|
||||||
case OTHER_ITEM:
|
|
||||||
default:
|
default:
|
||||||
return _other;
|
return _other;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue