pfnPresent1(DXGI) callback function

Notifies the user-mode display driver that an application finished rendering and that all ownership of the shared resource is released, and requests that the driver display to the destination surface.


pfnPresent1 Present1DXGI;

HRESULT __stdcall* Present1DXGI(
   DXGI_DDI_ARG_PRESENT1 *pPresentData
{ ... }



[in] A pointer to a DXGI_DDI_ARG_PRESENT1 structure that describes how to display to the destination surface.

Return value

Returns one of these values:

Return codeDescription

The resource was successfully displayed.


The driver detected that the graphics adapter was removed. Therefore, the driver did not complete the present operation. If the driver never notices the adapter-removal condition, the driver is not required to return this error code.



The hDevice member of the DXGI_DDI_ARG_PRESENT1 structure that the pPresentData parameter points to is the same handle that the driver's CreateDevice(D3D10) function passed back to the runtime in the hDrvDevice member of the D3D10DDIARG_CREATEDEVICE structure. Therefore, driver writers must define the type of this handle carefully. In addition, drivers can supply different implementations of the pfnPresent1(DXGI) function based on which device driver interface (DDI) implementation handled the call to CreateDevice(D3D10). The runtime will never mix driver handles across DDI implementations.

The pDXGIContext member of DXGI_DDI_ARG_PRESENT1 is an opaque communication mechanism. The runtime passes this Microsoft DirectX Graphics Infrastructure (DXGI) context to the driver. The driver should copy this DXGI context unchanged to the pDXGIContext member of the DXGIDDICB_PRESENT structure when the driver calls the pfnPresentCbDXGI function.

The driver must submit all partially built render data (command buffers) using the pfnRenderCb function, and the driver must make a single call to pfnPresentCbDXGI. When calling either of these callbacks, the driver must follow the threading rules of the PresentDXGI function.

Note   When the driver's pfnPresent1(DXGI) function copies sRGB-formatted content from a source surface to a non-sRGB destination surface, the driver should copy the sRGB content unchanged (that is, the driver should not perform the sRGB to linear conversion).

Threading rules

These rules apply whether the driver supports free threading or not:

  • The driver indicates support for free threading by setting the Caps member of the D3D11DDI_THREADING_CAPS structure to D3D11DDICAPS_FREETHREADED. In this case:
    • Only a single thread can be working against an HCONTEXT context handle at a time.
    • The driver must call pfnPresentCbDXGI only when the driver’s pfnPresent1(DXGI) function is called, and by the same thread that called pfnPresent1(DXGI).
  • When the driver doesn’t indicate support for free-threading, it can only call the callback functions when a thread has called into the driver. The driver also must still call the pfnPresentCbDXGI callback within the context of pfnPresent1(DXGI).

For further info on threading, see Changes from Direct3D 10.


Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Target platform



WDDM 1.3 and later


Dxgiddi.h (include D3d10umddi.h)

See also




Send comments about this topic to Microsoft