浏览代码

D3D12: Show GPU stats.

Branimir Karadžić 3 月之前
父节点
当前提交
66af8692bc
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/renderer_d3d12.cpp

+ 6 - 1
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)
 				{