diff --git a/Source/Engine/GraphicsDevice/DirectX/DX11/GPUTimerQueryDX11.cpp b/Source/Engine/GraphicsDevice/DirectX/DX11/GPUTimerQueryDX11.cpp index f0bd24dea..325f1aa34 100644 --- a/Source/Engine/GraphicsDevice/DirectX/DX11/GPUTimerQueryDX11.cpp +++ b/Source/Engine/GraphicsDevice/DirectX/DX11/GPUTimerQueryDX11.cpp @@ -107,13 +107,20 @@ float GPUTimerQueryDX11::GetResult() if (disjointData.Disjoint == FALSE) { - const float frequency = static_cast(disjointData.Frequency); const UINT64 delta = timeEnd - timeStart; - _timeDelta = (float)((delta / frequency) * 1000.0); + _timeDelta = (float)(((double)delta / (double)disjointData.Frequency) * 1000.0); } else { - LOG(Warning, "Unrealiable GPU timer query detected."); + _timeDelta = 0.0f; +#if !BUILD_RELEASE + static bool SingleShotLog = false; + if (!SingleShotLog) + { + SingleShotLog = true; + LOG(Warning, "Unrealiable GPU timer query detected."); + } +#endif } _finalized = true;