1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[hud] Don't average the draw call count

Turns out this was a bad idea.
This commit is contained in:
Philip Rebohle 2019-12-13 13:14:23 +01:00
parent ef99078fc4
commit 08d5b4e0e7
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 7 additions and 10 deletions

View File

@ -338,20 +338,18 @@ namespace dxvk::hud {
void HudDrawCallStatsItem::update(dxvk::high_resolution_clock::time_point time) {
auto elapsed = std::chrono::duration_cast<std::chrono::microseconds>(time - m_lastUpdate);
m_frameCount += 1;
DxvkStatCounters counters = m_device->getStatCounters();
auto diffCounters = counters.diff(m_prevCounters);
if (elapsed.count() >= UpdateInterval) {
DxvkStatCounters counters = m_device->getStatCounters();
auto diffCounters = counters.diff(m_prevCounters);
m_gpCount = diffCounters.getCtr(DxvkStatCounter::CmdDrawCalls);
m_cpCount = diffCounters.getCtr(DxvkStatCounter::CmdDispatchCalls);
m_rpCount = diffCounters.getCtr(DxvkStatCounter::CmdRenderPassCount);
m_gpCount = diffCounters.getCtr(DxvkStatCounter::CmdDrawCalls) / m_frameCount;
m_cpCount = diffCounters.getCtr(DxvkStatCounter::CmdDispatchCalls) / m_frameCount;
m_rpCount = diffCounters.getCtr(DxvkStatCounter::CmdRenderPassCount) / m_frameCount;
m_prevCounters = counters;
m_lastUpdate = time;
m_frameCount = 0;
}
m_prevCounters = counters;
}

View File

@ -269,7 +269,6 @@ namespace dxvk::hud {
Rc<DxvkDevice> m_device;
DxvkStatCounters m_prevCounters;
uint64_t m_frameCount = 0;
uint64_t m_gpCount = 0;
uint64_t m_cpCount = 0;