Added number of blit calls submitted stat.

This commit is contained in:
Branimir Karadžić
2018-10-09 18:10:54 -07:00
parent 52a5ca839c
commit bafcf613ba
9 changed files with 9 additions and 1 deletions

View File

@@ -912,6 +912,7 @@ namespace bgfx
uint32_t numDraw; //!< Number of draw calls submitted.
uint32_t numCompute; //!< Number of compute calls submitted.
uint32_t numBlit; //!< Number of blit calls submitted.
uint32_t maxGpuLatency; //!< GPU driver latency.
uint16_t numDynamicIndexBuffers; //!< Number of used dynamic index buffers.

View File

@@ -374,6 +374,7 @@ typedef struct bgfx_stats_s
uint32_t numDraw;
uint32_t numCompute;
uint32_t numBlit;
uint32_t maxGpuLatency;
uint16_t numDynamicIndexBuffers;

View File

@@ -6,7 +6,7 @@
#ifndef BGFX_DEFINES_H_HEADER_GUARD
#define BGFX_DEFINES_H_HEADER_GUARD
#define BGFX_API_VERSION UINT32_C(86)
#define BGFX_API_VERSION UINT32_C(87)
/// Color RGB/alpha/depth write. When it's not specified write will be disabled.
#define BGFX_STATE_WRITE_R UINT64_C(0x0000000000000001) //!< Enable R write.

View File

@@ -6148,6 +6148,7 @@ namespace bgfx { namespace d3d11
perfStats.gpuTimerFreq = result.m_frequency;
perfStats.numDraw = statsKeyType[0];
perfStats.numCompute = statsKeyType[1];
perfStats.numBlit = _render->m_numBlitItems;
perfStats.maxGpuLatency = maxGpuLatency;
bx::memCopy(perfStats.numPrims, statsNumPrimsRendered, sizeof(perfStats.numPrims) );
m_nvapi.getMemoryInfo(perfStats.gpuMemoryUsed, perfStats.gpuMemoryMax);

View File

@@ -6435,6 +6435,7 @@ namespace bgfx { namespace d3d12
perfStats.gpuTimerFreq = m_gpuTimer.m_frequency;
perfStats.numDraw = statsKeyType[0];
perfStats.numCompute = statsKeyType[1];
perfStats.numBlit = _render->m_numBlitItems;
perfStats.maxGpuLatency = maxGpuLatency;
bx::memCopy(perfStats.numPrims, statsNumPrimsRendered, sizeof(perfStats.numPrims) );
perfStats.gpuMemoryMax = -INT64_MAX;

View File

@@ -4401,6 +4401,7 @@ namespace bgfx { namespace d3d9
perfStats.gpuTimerFreq = result.m_frequency;
perfStats.numDraw = statsKeyType[0];
perfStats.numCompute = statsKeyType[1];
perfStats.numBlit = _render->m_numBlitItems;
perfStats.maxGpuLatency = maxGpuLatency;
bx::memCopy(perfStats.numPrims, statsNumPrimsRendered, sizeof(perfStats.numPrims) );
m_nvapi.getMemoryInfo(perfStats.gpuMemoryUsed, perfStats.gpuMemoryMax);

View File

@@ -7423,6 +7423,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
perfStats.gpuTimerFreq = 1000000000;
perfStats.numDraw = statsKeyType[0];
perfStats.numCompute = statsKeyType[1];
perfStats.numBlit = _render->m_numBlitItems;
perfStats.maxGpuLatency = maxGpuLatency;
bx::memCopy(perfStats.numPrims, statsNumPrimsRendered, sizeof(perfStats.numPrims) );
perfStats.gpuMemoryMax = -INT64_MAX;

View File

@@ -4103,6 +4103,7 @@ namespace bgfx { namespace mtl
perfStats.gpuTimerFreq = m_gpuTimer.m_frequency;
perfStats.numDraw = statsKeyType[0];
perfStats.numCompute = statsKeyType[1];
perfStats.numBlit = _render->m_numBlitItems;
perfStats.maxGpuLatency = maxGpuLatency;
bx::memCopy(perfStats.numPrims, statsNumPrimsRendered, sizeof(perfStats.numPrims) );
perfStats.gpuMemoryMax = -INT64_MAX;

View File

@@ -4407,6 +4407,7 @@ BX_UNUSED(presentMin, presentMax);
// perfStats.gpuTimerFreq = m_gpuTimer.m_frequency;
// perfStats.numDraw = statsKeyType[0];
// perfStats.numCompute = statsKeyType[1];
perfStats.numBlit = _render->m_numBlitItems;
// perfStats.maxGpuLatency = maxGpuLatency;
bx::memCopy(perfStats.numPrims, statsNumPrimsRendered, sizeof(perfStats.numPrims) );
perfStats.gpuMemoryMax = -INT64_MAX;