DXGI1_3_DDI_BASE_FUNCTIONS structure (dxgiddi.h)

Contains pointers to functions that a Windows Display Driver Model (WDDM) 1.3 and later user-mode display driver can implement to perform low-level tasks like presenting rendered frames to an output, controlling gamma, getting notifications regarding shared and Windows Graphics Device Interface (GDI) interoperable surfaces, and managing a full-screen transition.

Syntax

typedef struct DXGI1_3_DDI_BASE_FUNCTIONS {
  HRESULT()(DXGI_DDI_ARG_PRESENT *) * pfnPresent;
  HRESULT()(DXGI_DDI_ARG_GET_GAMMA_CONTROL_CAPS *) * pfnGetGammaCaps;
  HRESULT()(DXGI_DDI_ARG_SETDISPLAYMODE *) * pfnSetDisplayMode;
  HRESULT()(DXGI_DDI_ARG_SETRESOURCEPRIORITY *) * pfnSetResourcePriority;
  HRESULT()(DXGI_DDI_ARG_QUERYRESOURCERESIDENCY *) * pfnQueryResourceResidency;
  HRESULT()(DXGI_DDI_ARG_ROTATE_RESOURCE_IDENTITIES *) * pfnRotateResourceIdentities;
  HRESULT()(DXGI_DDI_ARG_BLT *) * pfnBlt;
  HRESULT()(DXGI_DDI_ARG_RESOLVESHAREDRESOURCE *) * pfnResolveSharedResource;
  HRESULT()(DXGI_DDI_ARG_BLT1 *) * pfnBlt1;
  HRESULT()(DXGI_DDI_ARG_OFFERRESOURCES *) * pfnOfferResources;
  HRESULT()(DXGI_DDI_ARG_RECLAIMRESOURCES *) * pfnReclaimResources;
  HRESULT()(DXGI_DDI_ARG_GETMULTIPLANEOVERLAYCAPS *) * pfnGetMultiplaneOverlayCaps;
  HRESULT()(DXGI_DDI_ARG_GETMULTIPLANEOVERLAYGROUPCAPS *) * pfnGetMultiplaneOverlayGroupCaps;
  HRESULT()(void *) * pfnReserved1;
  HRESULT()(DXGI_DDI_ARG_PRESENTMULTIPLANEOVERLAY *) * pfnPresentMultiplaneOverlay;
  HRESULT()(void *) * pfnReserved2;
  HRESULT()(DXGI_DDI_ARG_PRESENT1 *) * pfnPresent1;
  HRESULT()(DXGI_DDI_ARG_CHECKPRESENTDURATIONSUPPORT *) * pfnCheckPresentDurationSupport;
} DXGI1_3_DDI_BASE_FUNCTIONS;

Members

pfnPresent

A pointer to the driver's PresentDXGI function.

pfnGetGammaCaps

A pointer to the driver's GetGammaCapsDXGI function.

pfnSetDisplayMode

A pointer to the driver's SetDisplayModeDXGI function.

pfnSetResourcePriority

A pointer to the driver's SetResourcePriorityDXGI function.

pfnQueryResourceResidency

A pointer to the driver's QueryResourceResidencyDXGI function.

pfnRotateResourceIdentities

A pointer to the driver's RotateResourceIdentitiesDXGI function.

pfnBlt

A pointer to the driver's BltDXGI function.

pfnResolveSharedResource

A pointer to the driver's ResolveSharedResourceDXGI function.

pfnBlt1

A pointer to the driver's Blt1DXGI function.

pfnOfferResources

A pointer to the driver's pfnOfferResources function.

pfnReclaimResources

A pointer to the driver's pfnReclaimResources function.

pfnGetMultiplaneOverlayCaps

Called by the DXGI runtime to request that the user-mode display driver get basic overlay plane capabilities. Optionally implemented by WDDM 1.3 and later user-mode display drivers.

pfnGetMultiplaneOverlayGroupCaps

Called by the DXGI runtime to request that the user-mode display driver get a group of overlay plane capabilities. Optionally implemented by WDDM 1.3 and later user-mode display drivers.

Note  This function is called for each of the capability groups that the driver reports.
 

Syntax

pfnGetMultiplaneOverlayGroupCaps GetMultiplaneOverlayGroupCaps;

HRESULT __stdcall* GetMultiplaneOverlayGroupCaps(
   DXGI_DDI_ARG_GETMULTIPLANEOVERLAYGROUPCAPS *pGroupCaps
)
{ ... }

Parameter

pGroupCaps A pointer to a DXGI_DDI_ARG_GETMULTIPLANEOVERLAYGROUPCAPS structure that specifies the group of overlay plane capabilities.

Return value

Returns one of the following values.

  • S_OK The driver successfully provided the overlay plane capabilities.
  • D3DDDIERR_DEVICEREMOVED The driver detected that the display adapter was removed, so the driver did not complete the operation. If the driver is not aware of the adapter removal, the driver is not required to return this error code.

pfnReserved1

Reserved for system use.

pfnPresentMultiplaneOverlay

Called by the Microsoft DirectX Graphics Infrastructure (DXGI) runtime to notify the user-mode display driver that an application finished rendering and requests that the driver display the source surface by either copying or flipping or that the driver perform a color-fill operation. Must be implemented by Windows Display Driver Model (WDDM) 1.3 or later drivers that support multiplane overlays.

When the user-mode display driver successfully completes its processing of a call to this function, it presents the source surface to the display by calling the pfnPresentMultiPlaneOverlayCb (DXGI) function.

PFND3DDDI_PRESENTMULTIPLANEOVERLAY pfnPresentMultiPlaneOverlay;

HRESULT __stdcall* pfnPresentMultiPlaneOverlay(
   DXGI_DDI_ARG_PRESENTMULTIPLANEOVERLAY *pPresentDXGI
)
{ ... }

Parameter

pPresentDXGI A pointer to a DXGI_DDI_ARG_PRESENTMULTIPLANEOVERLAY structure that describes how to display to the destination surface.

Return value

If this callback function succeeds, it returns S_OK. Otherwise it returns an HRESULT error code.

pfnReserved2

Reserved for system use.

pfnPresent1

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.

Syntax

pfnPresent1 Present1DXGI;

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

Parameter

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

Remarks

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 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 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.

pfnCheckPresentDurationSupport

A pointer to the driver's pfnCheckPresentDurationSupport(DXGI) function.

Remarks

For more info on how to use this structure, see Supporting the DXGI DDI.

Requirements

Requirement Value
Minimum supported client Windows 8.1,WDDM 1.3 and later
Minimum supported server Windows Server 2012 R2
Header dxgiddi.h (include D3d10umddi.h)

See also

CreateDevice(D3D10)

D3D10DDIARG_CREATEDEVICE

DXGI1_2_DDI_BASE_FUNCTIONS

DXGI_DDI_BASE_ARGS

DXGI_DDI_BASE_FUNCTIONS