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:
parent
ef99078fc4
commit
08d5b4e0e7
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user