Updated stats display.

This commit is contained in:
Branimir Karadžić 2015-03-26 22:43:50 -07:00
parent 53b9e90d21
commit dc60f34883
3 changed files with 17 additions and 3 deletions

View file

@ -3146,6 +3146,7 @@ namespace bgfx { namespace d3d11
uint32_t statsNumPrimsRendered[BX_COUNTOF(s_primInfo)] = {};
uint32_t statsNumInstances[BX_COUNTOF(s_primInfo)] = {};
uint32_t statsNumIndices = 0;
uint32_t statsKeyType[2] = {};
if (0 == (_render->m_debug&BGFX_DEBUG_IFH) )
{
@ -3158,6 +3159,8 @@ namespace bgfx { namespace d3d11
for (int32_t item = 0, restartItem = numItems; item < numItems || restartItem < numItems;)
{
const bool isCompute = key.decode(_render->m_sortKeys[item], _render->m_viewRemap);
statsKeyType[isCompute]++;
const bool viewChanged = 0
|| key.m_view != view
|| item == numItems
@ -3801,8 +3804,10 @@ namespace bgfx { namespace d3d11
);
double elapsedCpuMs = double(elapsed)*toMs;
tvm.printf(10, pos++, 0x8e, " Draw calls: %4d / CPU %3.4f [ms]"
tvm.printf(10, pos++, 0x8e, " Submitted: %4d (draw %4d, compute %4d) / CPU %3.4f [ms]"
, _render->m_num
, statsKeyType[0]
, statsKeyType[1]
, elapsedCpuMs
);
for (uint32_t ii = 0; ii < BX_COUNTOF(s_primName); ++ii)

View file

@ -2888,6 +2888,7 @@ namespace bgfx { namespace d3d9
uint32_t statsNumPrimsRendered[BX_COUNTOF(s_primInfo)] = {};
uint32_t statsNumInstances[BX_COUNTOF(s_primInfo)] = {};
uint32_t statsNumIndices = 0;
uint32_t statsKeyType[2] = {};
invalidateSamplerState();
@ -2896,6 +2897,7 @@ namespace bgfx { namespace d3d9
for (uint32_t item = 0, numItems = _render->m_num; item < numItems; ++item)
{
const bool isCompute = key.decode(_render->m_sortKeys[item], _render->m_viewRemap);
statsKeyType[isCompute]++;
if (isCompute)
{
@ -3426,8 +3428,10 @@ namespace bgfx { namespace d3d9
);
double elapsedCpuMs = double(elapsed)*toMs;
tvm.printf(10, pos++, 0x8e, " Draw calls: %4d / CPU %3.4f [ms]"
tvm.printf(10, pos++, 0x8e, " Submitted: %4d (draw %4d, compute %4d) / CPU %3.4f [ms]"
, _render->m_num
, statsKeyType[0]
, statsKeyType[1]
, elapsedCpuMs
);
for (uint32_t ii = 0; ii < BX_COUNTOF(s_primName); ++ii)

View file

@ -4421,6 +4421,7 @@ namespace bgfx { namespace gl
uint32_t statsNumPrimsRendered[BX_COUNTOF(s_primInfo)] = {};
uint32_t statsNumInstances[BX_COUNTOF(s_primInfo)] = {};
uint32_t statsNumIndices = 0;
uint32_t statsKeyType[2] = {};
if (0 == (_render->m_debug&BGFX_DEBUG_IFH) )
{
@ -4435,6 +4436,8 @@ namespace bgfx { namespace gl
for (int32_t item = 0, restartItem = numItems; item < numItems || restartItem < numItems;)
{
const bool isCompute = key.decode(_render->m_sortKeys[item], _render->m_viewRemap);
statsKeyType[isCompute]++;
const bool viewChanged = 0
|| key.m_view != view
|| item == numItems
@ -5236,8 +5239,10 @@ namespace bgfx { namespace gl
);
double elapsedCpuMs = double(elapsed)*toMs;
tvm.printf(10, pos++, 0x8e, " Draw calls: %4d / CPU %3.4f [ms] %c GPU %3.4f [ms]"
tvm.printf(10, pos++, 0x8e, " Submitted: %4d (draw %4d, compute %4d) / CPU %3.4f [ms] %c GPU %3.4f [ms]"
, _render->m_num
, statsKeyType[0]
, statsKeyType[1]
, elapsedCpuMs
, elapsedCpuMs > elapsedGpuMs ? '>' : '<'
, elapsedGpuMs