Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-190050

Game doesn't explicitly doesn't opt in for screen tearing support resulting in incorrect V-Sync Off behavior.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21.51 Hotfix, 1.21.60.28 Preview
    • None
    • Unconfirmed
    • Windows

      Minecraft: Bedrock Edition on Windows doesn't opt in for Screen Tearing causing V-Sync Off to not behave correctly.

      Examples:

      • Game FPS capped 2x the refresh rate.
      • Capped FPS in fullscreen but Uncapped in windowed.

      The root issue seems to be how the game is requesting V-Sync to be turned off.

      By using PresentMon, a tool that allows us to see performance metrics of a graphical application we can see how IDXGISwapChain::Present() is being called.
      Make sure to download their CLI tool & not their installer for PresentMon!

      Using the following command in an admin Command Prompt window with gfx_vsync set to 0 disable V-Sync ingame:

      presentmon.exe -no_csv -process_name Minecraft.Windows.exe 

      Minecraft: Bedrock Edition internally calls the function as follows:

      IDXGISwapChain::Present(0, 0)
      

      Technically this does disable V-Sync but as mentioned before it doesn't behave as intended.

      My monitor is 75 Hz & as you can see it's capped double the refresh rate.

      Microsoft's Documentation for IDXGISwapchain::Present flags specifically mentions DXGI_PRESENT_ALLOW_TEARING must be used in an windowed application to allow for screen tearing as well as the swapchain having screen tearing support via DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING.

      For demonstration purposes, here is the game modded to add screen tearing support.

      This is done by:

      • Hooking IDXGISwapchain::Present(), IDXGISwapchain::ResizeBuffers() & IDXGIFactory2::CreateSwapChainForCoreWindow.
      • Add screen tearing support via flags as required.

       

      As you can see as soon as we add screen tearing support, V-Sync works as intended.

      Additionally this also fixes MCPE-98861 since V-Sync off works as intended.

       

       

            Aetopia Aetopia
            Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: