mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Merge pull request #8833 from jherico/gpu_stats
Add GPU buffer and texture current counts to the main stats display
This commit is contained in:
commit
a9dd31f59d
3 changed files with 17 additions and 0 deletions
|
@ -246,6 +246,16 @@ Item {
|
|||
text: "Triangles: " + root.triangles +
|
||||
" / Material Switches: " + root.materialSwitches
|
||||
}
|
||||
Text {
|
||||
color: root.fontColor;
|
||||
font.pixelSize: root.fontSize
|
||||
text: "GPU Textures: " + root.gpuTextures;
|
||||
}
|
||||
Text {
|
||||
color: root.fontColor;
|
||||
font.pixelSize: root.fontSize
|
||||
text: "GPU Buffers: " + root.gpuBuffers;
|
||||
}
|
||||
Text {
|
||||
color: root.fontColor;
|
||||
font.pixelSize: root.fontSize
|
||||
|
|
|
@ -285,6 +285,9 @@ void Stats::updateStats(bool force) {
|
|||
STAT_UPDATE(sendingMode, sendingModeResult);
|
||||
}
|
||||
|
||||
STAT_UPDATE(gpuBuffers, (int)gpu::Context::getBufferGPUCount());
|
||||
STAT_UPDATE(gpuTextures, (int)gpu::Context::getTextureGPUCount());
|
||||
|
||||
// Incoming packets
|
||||
QLocale locale(QLocale::English);
|
||||
auto voxelPacketsToProcess = qApp->getOctreePacketProcessor().packetsToProcessCount();
|
||||
|
|
|
@ -89,6 +89,8 @@ class Stats : public QQuickItem {
|
|||
STATS_PROPERTY(int, localElements, 0)
|
||||
STATS_PROPERTY(int, localInternal, 0)
|
||||
STATS_PROPERTY(int, localLeaves, 0)
|
||||
STATS_PROPERTY(int, gpuBuffers, 0)
|
||||
STATS_PROPERTY(int, gpuTextures, 0)
|
||||
|
||||
public:
|
||||
static Stats* getInstance();
|
||||
|
@ -177,6 +179,8 @@ signals:
|
|||
void localInternalChanged();
|
||||
void localLeavesChanged();
|
||||
void timingStatsChanged();
|
||||
void gpuBuffersChanged();
|
||||
void gpuTexturesChanged();
|
||||
|
||||
private:
|
||||
int _recentMaxPackets{ 0 } ; // recent max incoming voxel packets to process
|
||||
|
|
Loading…
Reference in a new issue