|
|
@@ -5882,7 +5882,7 @@ namespace bgfx { namespace d3d12
|
|
|
DX_RELEASE(m_readback, 0);
|
|
|
}
|
|
|
|
|
|
- uint32_t TimerQueryD3D12::begin(uint32_t _resultIdx)
|
|
|
+ uint32_t TimerQueryD3D12::begin(uint32_t _resultIdx, uint32_t _frameNum)
|
|
|
{
|
|
|
while (0 == m_control.reserve(1) )
|
|
|
{
|
|
|
@@ -5896,6 +5896,7 @@ namespace bgfx { namespace d3d12
|
|
|
Query& query = m_query[idx];
|
|
|
query.m_resultIdx = _resultIdx;
|
|
|
query.m_ready = false;
|
|
|
+ query.m_frameNum = _frameNum;
|
|
|
|
|
|
ID3D12GraphicsCommandList* commandList = s_renderD3D12->m_commandList;
|
|
|
|
|
|
@@ -5957,6 +5958,7 @@ namespace bgfx { namespace d3d12
|
|
|
|
|
|
Result& result = m_result[query.m_resultIdx];
|
|
|
--result.m_pending;
|
|
|
+ result.m_frameNum = query.m_frameNum;
|
|
|
|
|
|
uint32_t offset = idx * 2;
|
|
|
result.m_begin = m_queryResult[offset+0];
|
|
|
@@ -6192,7 +6194,7 @@ namespace bgfx { namespace d3d12
|
|
|
int64_t timeBegin = bx::getHPCounter();
|
|
|
int64_t captureElapsed = 0;
|
|
|
|
|
|
- uint32_t frameQueryIdx = m_gpuTimer.begin(BGFX_CONFIG_MAX_VIEWS);
|
|
|
+ uint32_t frameQueryIdx = m_gpuTimer.begin(BGFX_CONFIG_MAX_VIEWS, _render->m_frameNum);
|
|
|
|
|
|
if (0 < _render->m_iboffset)
|
|
|
{
|
|
|
@@ -7066,6 +7068,7 @@ namespace bgfx { namespace d3d12
|
|
|
perfStats.numCompute = statsKeyType[1];
|
|
|
perfStats.numBlit = _render->m_numBlitItems;
|
|
|
perfStats.maxGpuLatency = maxGpuLatency;
|
|
|
+ perfStats.gpuFrameNum = result.m_frameNum;
|
|
|
bx::memCopy(perfStats.numPrims, statsNumPrimsRendered, sizeof(perfStats.numPrims) );
|
|
|
perfStats.gpuMemoryMax = -INT64_MAX;
|
|
|
perfStats.gpuMemoryUsed = -INT64_MAX;
|