mirror of
https://github.com/JulianGro/overte.git
synced 2025-05-08 23:19:35 +02:00
Add ideal resource texture memory stat
This commit is contained in:
parent
fb81cf927a
commit
ae07036f20
5 changed files with 21 additions and 2 deletions
|
@ -281,10 +281,12 @@ Item {
|
||||||
text: " Pressure State: " + root.gpuTextureMemoryPressureState;
|
text: " Pressure State: " + root.gpuTextureMemoryPressureState;
|
||||||
}
|
}
|
||||||
StatText {
|
StatText {
|
||||||
text: " Resource Allocated / Populated / Pending: ";
|
property bool showIdeal: (root.gpuTextureResourceIdealMemory != root.gpuTextureResourceMemory);
|
||||||
|
text: " Resource Allocated " + (showIdeal ? "(Ideal)" : "") + " / Populated / Pending: ";
|
||||||
}
|
}
|
||||||
StatText {
|
StatText {
|
||||||
text: " " + root.gpuTextureResourceMemory + " / " + root.gpuTextureResourcePopulatedMemory + " / " + root.texturePendingTransfers + " MB";
|
property bool showIdeal: (root.gpuTextureResourceIdealMemory != root.gpuTextureResourceMemory);
|
||||||
|
text: " " + root.gpuTextureResourceMemory + (showIdeal ? ("(" + root.gpuTextureResourceIdealMemory + ")") : "") + " / " + root.gpuTextureResourcePopulatedMemory + " / " + root.texturePendingTransfers + " MB";
|
||||||
}
|
}
|
||||||
StatText {
|
StatText {
|
||||||
text: " Resident Memory: " + root.gpuTextureResidentMemory + " MB";
|
text: " Resident Memory: " + root.gpuTextureResidentMemory + " MB";
|
||||||
|
|
|
@ -354,6 +354,7 @@ void Stats::updateStats(bool force) {
|
||||||
STAT_UPDATE(gpuTextureResidentMemory, (int)BYTES_TO_MB(gpu::Context::getTextureResidentGPUMemSize()));
|
STAT_UPDATE(gpuTextureResidentMemory, (int)BYTES_TO_MB(gpu::Context::getTextureResidentGPUMemSize()));
|
||||||
STAT_UPDATE(gpuTextureFramebufferMemory, (int)BYTES_TO_MB(gpu::Context::getTextureFramebufferGPUMemSize()));
|
STAT_UPDATE(gpuTextureFramebufferMemory, (int)BYTES_TO_MB(gpu::Context::getTextureFramebufferGPUMemSize()));
|
||||||
STAT_UPDATE(gpuTextureResourceMemory, (int)BYTES_TO_MB(gpu::Context::getTextureResourceGPUMemSize()));
|
STAT_UPDATE(gpuTextureResourceMemory, (int)BYTES_TO_MB(gpu::Context::getTextureResourceGPUMemSize()));
|
||||||
|
STAT_UPDATE(gpuTextureResourceIdealMemory, (int)BYTES_TO_MB(gpu::Context::getTextureResourceIdealGPUMemSize()));
|
||||||
STAT_UPDATE(gpuTextureResourcePopulatedMemory, (int)BYTES_TO_MB(gpu::Context::getTextureResourcePopulatedGPUMemSize()));
|
STAT_UPDATE(gpuTextureResourcePopulatedMemory, (int)BYTES_TO_MB(gpu::Context::getTextureResourcePopulatedGPUMemSize()));
|
||||||
STAT_UPDATE(gpuTextureExternalMemory, (int)BYTES_TO_MB(gpu::Context::getTextureExternalGPUMemSize()));
|
STAT_UPDATE(gpuTextureExternalMemory, (int)BYTES_TO_MB(gpu::Context::getTextureExternalGPUMemSize()));
|
||||||
#if !defined(Q_OS_ANDROID)
|
#if !defined(Q_OS_ANDROID)
|
||||||
|
|
|
@ -126,6 +126,7 @@ private: \
|
||||||
* @property {number} gpuTextureResidentMemory - <em>Read-only.</em>
|
* @property {number} gpuTextureResidentMemory - <em>Read-only.</em>
|
||||||
* @property {number} gpuTextureFramebufferMemory - <em>Read-only.</em>
|
* @property {number} gpuTextureFramebufferMemory - <em>Read-only.</em>
|
||||||
* @property {number} gpuTextureResourceMemory - <em>Read-only.</em>
|
* @property {number} gpuTextureResourceMemory - <em>Read-only.</em>
|
||||||
|
* @property {number} gpuTextureResourceIdealMemory - <em>Read-only.</em>
|
||||||
* @property {number} gpuTextureResourcePopulatedMemory - <em>Read-only.</em>
|
* @property {number} gpuTextureResourcePopulatedMemory - <em>Read-only.</em>
|
||||||
* @property {number} gpuTextureExternalMemory - <em>Read-only.</em>
|
* @property {number} gpuTextureExternalMemory - <em>Read-only.</em>
|
||||||
* @property {string} gpuTextureMemoryPressureState - <em>Read-only.</em>
|
* @property {string} gpuTextureMemoryPressureState - <em>Read-only.</em>
|
||||||
|
@ -270,6 +271,7 @@ class Stats : public QQuickItem {
|
||||||
STATS_PROPERTY(int, gpuTextureResidentMemory, 0)
|
STATS_PROPERTY(int, gpuTextureResidentMemory, 0)
|
||||||
STATS_PROPERTY(int, gpuTextureFramebufferMemory, 0)
|
STATS_PROPERTY(int, gpuTextureFramebufferMemory, 0)
|
||||||
STATS_PROPERTY(int, gpuTextureResourceMemory, 0)
|
STATS_PROPERTY(int, gpuTextureResourceMemory, 0)
|
||||||
|
STATS_PROPERTY(int, gpuTextureResourceIdealMemory, 0)
|
||||||
STATS_PROPERTY(int, gpuTextureResourcePopulatedMemory, 0)
|
STATS_PROPERTY(int, gpuTextureResourcePopulatedMemory, 0)
|
||||||
STATS_PROPERTY(int, gpuTextureExternalMemory, 0)
|
STATS_PROPERTY(int, gpuTextureExternalMemory, 0)
|
||||||
STATS_PROPERTY(QString, gpuTextureMemoryPressureState, QString())
|
STATS_PROPERTY(QString, gpuTextureMemoryPressureState, QString())
|
||||||
|
@ -918,6 +920,13 @@ signals:
|
||||||
*/
|
*/
|
||||||
void gpuTextureResourceMemoryChanged();
|
void gpuTextureResourceMemoryChanged();
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* Triggered when the value of the <code>gpuTextureResourceIdealMemory</code> property changes.
|
||||||
|
* @function Stats.gpuTextureResourceIdealMemoryChanged
|
||||||
|
* @returns {Signal}
|
||||||
|
*/
|
||||||
|
void gpuTextureResourceIdealMemoryChanged();
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Triggered when the value of the <code>gpuTextureResourcePopulatedMemory</code> property changes.
|
* Triggered when the value of the <code>gpuTextureResourcePopulatedMemory</code> property changes.
|
||||||
* @function Stats.gpuTextureResourcePopulatedMemoryChanged
|
* @function Stats.gpuTextureResourcePopulatedMemoryChanged
|
||||||
|
|
|
@ -270,6 +270,7 @@ ContextMetricCount Backend::texturePendingGPUTransferCount;
|
||||||
ContextMetricSize Backend::texturePendingGPUTransferMemSize;
|
ContextMetricSize Backend::texturePendingGPUTransferMemSize;
|
||||||
|
|
||||||
ContextMetricSize Backend::textureResourcePopulatedGPUMemSize;
|
ContextMetricSize Backend::textureResourcePopulatedGPUMemSize;
|
||||||
|
ContextMetricSize Backend::textureResourceIdealGPUMemSize;
|
||||||
|
|
||||||
Size Context::getFreeGPUMemSize() {
|
Size Context::getFreeGPUMemSize() {
|
||||||
return Backend::freeGPUMemSize.getValue();
|
return Backend::freeGPUMemSize.getValue();
|
||||||
|
@ -329,3 +330,7 @@ Size Context::getTexturePendingGPUTransferMemSize() {
|
||||||
Size Context::getTextureResourcePopulatedGPUMemSize() {
|
Size Context::getTextureResourcePopulatedGPUMemSize() {
|
||||||
return Backend::textureResourcePopulatedGPUMemSize.getValue();
|
return Backend::textureResourcePopulatedGPUMemSize.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Size Context::getTextureResourceIdealGPUMemSize() {
|
||||||
|
return Backend::textureResourceIdealGPUMemSize.getValue();
|
||||||
|
}
|
||||||
|
|
|
@ -113,6 +113,7 @@ public:
|
||||||
static ContextMetricCount texturePendingGPUTransferCount;
|
static ContextMetricCount texturePendingGPUTransferCount;
|
||||||
static ContextMetricSize texturePendingGPUTransferMemSize;
|
static ContextMetricSize texturePendingGPUTransferMemSize;
|
||||||
static ContextMetricSize textureResourcePopulatedGPUMemSize;
|
static ContextMetricSize textureResourcePopulatedGPUMemSize;
|
||||||
|
static ContextMetricSize textureResourceIdealGPUMemSize;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -243,6 +244,7 @@ public:
|
||||||
static Size getTexturePendingGPUTransferMemSize();
|
static Size getTexturePendingGPUTransferMemSize();
|
||||||
|
|
||||||
static Size getTextureResourcePopulatedGPUMemSize();
|
static Size getTextureResourcePopulatedGPUMemSize();
|
||||||
|
static Size getTextureResourceIdealGPUMemSize();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Context(const Context& context);
|
Context(const Context& context);
|
||||||
|
|
Loading…
Reference in a new issue