@@ -1093,7 +1093,7 @@ void CDX11VideoProcessor::CalcStatsParams()
10931093 if (S_OK == m_Font3D.CreateFontBitmap (L" Consolas" , m_StatsFontH, 0 )) {
10941094 SIZE charSize = m_Font3D.GetMaxCharMetric ();
10951095 m_StatsRect.right = m_StatsRect.left + 61 * charSize.cx + 5 + 3 ;
1096- m_StatsRect.bottom = m_StatsRect.top + 18 * charSize.cy + 5 + 3 ;
1096+ m_StatsRect.bottom = m_StatsRect.top + 19 * charSize.cy + 5 + 3 ;
10971097 }
10981098 m_StatsBackground.Set (m_StatsRect, rtSize, D3DCOLOR_ARGB (80 , 0 , 0 , 0 ));
10991099
@@ -3832,9 +3832,6 @@ void CDX11VideoProcessor::UpdateStatsPresent()
38323832 DXGI_SWAP_CHAIN_DESC1 swapchain_desc;
38333833 if (m_pDXGISwapChain1 && S_OK == m_pDXGISwapChain1->GetDesc1 (&swapchain_desc)) {
38343834 m_strStatsPresent.assign (L" \n Presentation : " );
3835- if (m_bVBlankBeforePresent && m_pDXGIOutput) {
3836- m_strStatsPresent.append (L" wait VBlank, " );
3837- }
38383835 switch (swapchain_desc.SwapEffect ) {
38393836 case DXGI_SWAP_EFFECT_DISCARD:
38403837 m_strStatsPresent.append (L" Discard" );
@@ -3851,6 +3848,19 @@ void CDX11VideoProcessor::UpdateStatsPresent()
38513848 }
38523849 m_strStatsPresent.append (L" , " );
38533850 m_strStatsPresent.append (DXGIFormatToString (swapchain_desc.Format ));
3851+
3852+ if ((m_bVBlankBeforePresent && m_pDXGIOutput) || m_bAdjustPresentTime) {
3853+ m_strStatsPresent.append (L" \n Frame sync :" );
3854+ if (m_bVBlankBeforePresent && m_pDXGIOutput) {
3855+ m_strStatsPresent.append (L" wait VBlank" );
3856+ }
3857+ if (m_bAdjustPresentTime) {
3858+ if (m_strStatsPresent.back () != ' :' ) {
3859+ m_strStatsPresent += ' ,' ;
3860+ }
3861+ m_strStatsPresent.append (L" adjust present time" );
3862+ }
3863+ }
38543864 }
38553865}
38563866
@@ -4005,11 +4015,12 @@ HRESULT CDX11VideoProcessor::DrawStats(ID3D11Texture2D* pRenderTarget)
40054015 str.append (m_strStatsHDR);
40064016 str.append (m_strStatsPresent);
40074017
4008- str += std::format (L" \n Frames: {:5}, skipped: {}/{}, failed: {}" ,
4018+ str += std::format (L" \n Frames : {:5}, skipped: {}/{}, failed: {}" ,
40094019 m_pFilter->m_FrameStats .GetFrames (), m_pFilter->m_DrawStats .m_dropped , m_RenderStats.dropped2 , m_RenderStats.failed );
4010- str += std::format (L" \n Times(ms): Copy{:3}, Paint{:3}, Present{:3}" ,
4011- m_RenderStats.copyticks * 1000 / GetPreciseTicksPerSecondI (),
4012- m_RenderStats.paintticks * 1000 / GetPreciseTicksPerSecondI (),
4020+
4021+ str += std::format (L" \n Times(ms) : Copy{:3}, Paint{:3}, Present{:3}" ,
4022+ m_RenderStats.copyticks * 1000 / GetPreciseTicksPerSecondI (),
4023+ m_RenderStats.paintticks * 1000 / GetPreciseTicksPerSecondI (),
40134024 m_RenderStats.presentticks * 1000 / GetPreciseTicksPerSecondI ());
40144025
40154026 str += std::format (L" \n Sync offset : {:+3} ms" , (m_RenderStats.syncoffset + 5000 ) / 10000 );
0 commit comments