Fixed GPU timer read-back.
This commit is contained in:
parent
d8d17994dc
commit
00a2a9c964
@ -5958,12 +5958,14 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
{
|
||||
m_gpuTimer.end();
|
||||
|
||||
while (m_gpuTimer.get() )
|
||||
do
|
||||
{
|
||||
double toGpuMs = 1000.0 / double(m_gpuTimer.m_frequency);
|
||||
elapsedGpuMs = m_gpuTimer.m_elapsed * toGpuMs;
|
||||
maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed;
|
||||
}
|
||||
while (m_gpuTimer.get() );
|
||||
|
||||
maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.available()-1);
|
||||
}
|
||||
|
||||
|
@ -5413,12 +5413,14 @@ data.NumQualityLevels = 0;
|
||||
|
||||
m_gpuTimer.end(m_commandList);
|
||||
|
||||
while (m_gpuTimer.get() )
|
||||
do
|
||||
{
|
||||
double toGpuMs = 1000.0 / double(m_gpuTimer.m_frequency);
|
||||
elapsedGpuMs = m_gpuTimer.m_elapsed * toGpuMs;
|
||||
maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed;
|
||||
}
|
||||
while (m_gpuTimer.get() );
|
||||
|
||||
maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.available()-1);
|
||||
|
||||
const int64_t timerFreq = bx::getHPFrequency();
|
||||
|
@ -4188,12 +4188,14 @@ namespace bgfx { namespace d3d9
|
||||
{
|
||||
m_gpuTimer.end();
|
||||
|
||||
while (m_gpuTimer.get() )
|
||||
do
|
||||
{
|
||||
double toGpuMs = 1000.0 / double(m_gpuTimer.m_frequency);
|
||||
elapsedGpuMs = m_gpuTimer.m_elapsed * toGpuMs;
|
||||
maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed;
|
||||
}
|
||||
while (m_gpuTimer.get() );
|
||||
|
||||
maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.available()-1);
|
||||
}
|
||||
|
||||
|
@ -6791,12 +6791,14 @@ namespace bgfx { namespace gl
|
||||
if (m_timerQuerySupport)
|
||||
{
|
||||
m_gpuTimer.end();
|
||||
while (m_gpuTimer.get() )
|
||||
do
|
||||
{
|
||||
elapsedGl = m_gpuTimer.m_elapsed;
|
||||
elapsedGpuMs = double(elapsedGl)/1e6;
|
||||
maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed;
|
||||
}
|
||||
while (m_gpuTimer.get() );
|
||||
|
||||
maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.available()-1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user