From 66af8692bc6565b2cde4f2ca66d1f59e03359081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 23 Oct 2025 23:17:34 -0700 Subject: [PATCH] D3D12: Show GPU stats. --- src/renderer_d3d12.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/renderer_d3d12.cpp b/src/renderer_d3d12.cpp index 3876bd801..17cadd539 100644 --- a/src/renderer_d3d12.cpp +++ b/src/renderer_d3d12.cpp @@ -7358,12 +7358,17 @@ namespace bgfx { namespace d3d12 ); double elapsedCpuMs = double(frameTime)*toMs; - tvm.printf(10, pos++, 0x8b, " Submitted: %5d (draw %5d, compute %4d) / CPU %7.4f [ms] " + tvm.printf(10, pos++, 0x8b, " Submitted: %5d (draw %5d, compute %4d) / CPU %7.4f [ms] %c GPU %7.4f [ms] (latency %d) " , _render->m_numRenderItems , statsKeyType[0] , statsKeyType[1] , elapsedCpuMs + , elapsedCpuMs > maxGpuElapsed ? '>' : '<' + , maxGpuElapsed + , maxGpuLatency ); + maxGpuLatency = 0; + maxGpuElapsed = 0.0; for (uint32_t ii = 0; ii < Topology::Count; ++ii) {