Multiple buffering#Triple buffering

The triple buffering (English triple buffering ) describes a concept in computer graphics, in which the frame buffer of the video RAM is divided into three areas with graphics cards. Objective of the procedure is to compensate for the simultaneous use of vsync ( vertical sync ) and double buffering ( double buffering ) occurring during drawbacks of image construction.

The difference between double and triple buffering lies in the classification of the framebuffer. While the double-buffering the frame buffer of two buffers (front and back buffer ) is given, there are those three in triple buffering ( a front buffer and back buffer two ).

Operation

In front buffer is the image that is brought by the RAMDAC straight to the screen. In the back buffer 1, the next image is rendered (calculated). The further procedure is dependent on when the swap command is implemented. This is initiated by the GPU when the next frame is ready to issue and cause swapping the memory addresses of the front and back buffer ( Flip Page ).

  • This process corresponds to VSync = off The swap command is converted directly at the end of the calculations in the back buffer 1, and thus the front and back buffers swapped. This can lead to the so-called tearing, in which the output on the monitor image from possibly several consecutive frames is. The back buffer 2 remains unused in this combination. Triple buffering without vsync is therefore a waste of resources.
  • This process corresponds to VSync = on The calculations in the back buffer 1 has been completed and it has already begun with the rendering of the next image in the back buffer 2. Now the reaction of the swap command. The new front buffer (formerly BackBuffer 1 ) contains the calculations are done and image is displayed on the monitor. In the new back buffer 1 (formerly BackBuffer 2) takes place, the calculation of the next frame. The new back buffer 2 (former front buffer ) was deleted and is ready for further use.

Double buffering and vsync

Through the use of VSync is the swap command exchanges the front and back buffer, as long as not implemented until the current image is shown from the front buffer completely on the screen. Is the calculation of the new frame finished in back buffer, the GPU must therefore wait until the next VSync to continue with the next frame. The effective computation time per image is thus always equal to or a whole multiple of the time required for the monitor to display an image. If the frame rate of the GPU So, for example, is just below the monitor, the effective frame rate only half of the monitor frame rate (because the GPU is not yet finished with the rendering of the image at every second VSync ). If it is less than half of it is a third of the monitor frame rate, etc.

Triple buffering and vsync

By a further BackBuffer the frame rate of the monitor of the GPU can be decoupled. When a picture is completed, the GPU does not have to now wait until the swap command is executed, but can continue to work directly in the other back buffer. When the swap command occurrence that is the two back buffers are swapped while the front buffer and back buffer are swapped already calculated the occurrence of VSync. So there will be no performance loss compared to the unbuffered case.

Pros and Cons of triple buffering and vsync

Benefits

  • Optimal image quality as there is no tearing occurs ( graphical artifact when several successive images are used during image output )
  • No performance loss

Disadvantages

  • The frame buffer is up to 50 % greater than double buffering
  • Slightly (up to 1 frame ) increases in latency
294008
de