IDirect3DDevice9Ex::SetMaximumFrameLatency method (d3d9.h)
Set the number of frames that the system is allowed to queue for rendering.
HRESULT SetMaximumFrameLatency( UINT MaxLatency );
The maximum number of back buffer frames that a driver can queue. The value is typically 3, but can range from 1 to 20. A value of 0 will reset latency to the default. For multi-head devices, MaxLatency is specified per-head.
Possible return values include: D3D_OK or D3DERR_DEVICEREMOVED (see D3DERR).
Frame latency is the number of frames that are allowed to be stored in a queue, before submission for rendering. Latency is often used to control how the CPU chooses between responding to user input and frames that are in the render queue.
It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.