How does MSI Afterburner frame counter work?

Discussion in 'MSI AfterBurner Application Development Forum' started by SlapGun, Dec 23, 2013.

  1. SlapGun

    SlapGun New Member

    Messages:
    3
    Likes Received:
    0
    GPU:
    GTX 560
    I have a question, I guess it's more for the devs of MSI Afterburner, but have no idea how to reach them. Anyway, I'm interested, because I'm developing a 3D engine (very early stage right now) and when I launched my engine with afterburner - noticed a strange thing. My app shows ~2300 fps, MSI Afterburner shows ~2000 fps. So I'm interested how the frame counting happens in afterburner, because not sure which is inaccurate...

    Thank You in advance :)
     
  2. anDrasch

    anDrasch Active Member

    Messages:
    78
    Likes Received:
    1
    GPU:
    Nvidia
    Which RTSS Version do you use?
     
  3. SlapGun

    SlapGun New Member

    Messages:
    3
    Likes Received:
    0
    GPU:
    GTX 560
    4.5.0.0
     
  4. anDrasch

    anDrasch Active Member

    Messages:
    78
    Likes Received:
    1
    GPU:
    Nvidia

  5. SlapGun

    SlapGun New Member

    Messages:
    3
    Likes Received:
    0
    GPU:
    GTX 560
    okay so installed that, ran my app again, it reports around ~5.7k fps, and onscreen display reports ~4.3k fps. For some reason it's 2k more fps than last time, dunno what's up with that lol. I'm beginning to think that the mystery behind fps difference is somewhere along the lines of my code, how I'm counting the frames per second.

    If someone knows C++ and DirectX, here's the code:

    //get the ticks using QueryPerformanceCounter

    m_deviceContext->ClearRenderTargetView(m_renderTargetView, color);
    m_deviceContext->ClearDepthStencilView(m_depthStencilView, D3D11_CLEAR_DEPTH, 1.0f, 0);
    m_swapChain->Present(0, 0);

    //get ticks again
     
  6. BenYeeHua

    BenYeeHua Ancient Guru

    Messages:
    1,515
    Likes Received:
    0
    GPU:
    Asus 650M D3
    I guess it is caused by the way to calculate it?
    Like Fraps, you can get 60FPS even it is stutter.
    Anyways, you can using the log function to record the frame time, then you will know it is caused by stutter or not.
     
  7. Unwinder

    Unwinder Moderator Staff Member

    Messages:
    15,555
    Likes Received:
    2,950
    Ring buffer of last 1024 sampled frametimes is being updated on each frame. Framerate is calculated using this ring buffer on >= 1000ms interval.
     

Share This Page