Export (0) Print
Expand All
Expand Minimize

D3DDDI_DEVICECALLBACKS structure

The D3DDDI_DEVICECALLBACKS structure contains Microsoft Direct3D runtime callback functions that the user-mode display driver can use.

Syntax


typedef struct _D3DDDI_DEVICECALLBACKS {
  PFND3DDDI_ALLOCATECB                      pfnAllocateCb;
  PFND3DDDI_DEALLOCATECB                    pfnDeallocateCb;
  PFND3DDDI_SETPRIORITYCB                   pfnSetPriorityCb;
  PFND3DDDI_QUERYRESIDENCYCB                pfnQueryResidencyCb;
  PFND3DDDI_SETDISPLAYMODECB                pfnSetDisplayModeCb;
  PFND3DDDI_PRESENTCB                       pfnPresentCb;
  PFND3DDDI_RENDERCB                        pfnRenderCb;
  PFND3DDDI_LOCKCB                          pfnLockCb;
  PFND3DDDI_UNLOCKCB                        pfnUnlockCb;
  PFND3DDDI_ESCAPECB                        pfnEscapeCb;
  PFND3DDDI_CREATEOVERLAYCB                 pfnCreateOverlayCb;
  PFND3DDDI_UPDATEOVERLAYCB                 pfnUpdateOverlayCb;
  PFND3DDDI_FLIPOVERLAYCB                   pfnFlipOverlayCb;
  PFND3DDDI_DESTROYOVERLAYCB                pfnDestroyOverlayCb;
  PFND3DDDI_CREATECONTEXTCB                 pfnCreateContextCb;
  PFND3DDDI_DESTROYCONTEXTCB                pfnDestroyContextCb;
  PFND3DDDI_CREATESYNCHRONIZATIONOBJECTCB   pfnCreateSynchronizationObjectCb;
  PFND3DDDI_DESTROYSYNCHRONIZATIONOBJECTCB  pfnDestroySynchronizationObjectCb;
  PFND3DDDI_WAITFORSYNCHRONIZATIONOBJECTCB  pfnWaitForSynchronizationObjectCb;
  PFND3DDDI_SIGNALSYNCHRONIZATIONOBJECTCB   pfnSignalSynchronizationObjectCb;
  PFND3DDDI_SETASYNCCALLBACKSCB             pfnSetAsyncCallbacksCb;
  PFND3DDDI_SETDISPLAYPRIVATEDRIVERFORMATCB pfnSetDisplayPrivateDriverFormatCb;
#if (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WIN8)
  PFND3DDDI_OFFERALLOCATIONSCB              pfnOfferAllocationsCb;
  PFND3DDDI_RECLAIMALLOCATIONSCB            pfnReclaimAllocationsCb;
  PFND3DDDI_CREATESYNCHRONIZATIONOBJECT2CB  pfnCreateSynchronizationObject2Cb;
  PFND3DDDI_WAITFORSYNCHRONIZATIONOBJECT2CB pfnWaitForSynchronizationObject2Cb;
  PFND3DDDI_SIGNALSYNCHRONIZATIONOBJECT2CB  pfnSignalSynchronizationObject2Cb;
  PFND3DDDI_PRESENTMULTIPLANEOVERLAYCB      pfnPresentMultiPlaneOverlayCb;
#endif 
#if (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM1_3)
  PFND3DDDI_LOGUMDMARKERCB                  pfnLogUMDMarkerCb;
#endif 
} D3DDDI_DEVICECALLBACKS;

Members

pfnAllocateCb

A pointer to the pfnAllocateCb function, which the user-mode display driver uses to request that the Direct3D runtime create a memory allocation for use by the driver.

pfnDeallocateCb

A pointer to the pfnDeallocateCb function, which the user-mode display driver uses to request that the Direct3D runtime free memory that was previously allocated.

pfnSetPriorityCb

A pointer to the pfnSetPriorityCb function, which the user-mode display driver uses to set the priority of a resource or list of allocations.

pfnQueryResidencyCb

A pointer to the pfnQueryResidencyCb function, which the user-mode display driver uses to query the residency status of a resource or list of allocations.

pfnSetDisplayModeCb

A pointer to the pfnSetDisplayModeCb function, which the user-mode display driver uses to set an allocation for displaying.

pfnPresentCb

A pointer to the pfnPresentCb function, which the user-mode display driver uses to submit a present command to the display miniport driver.

pfnRenderCb

A pointer to the pfnRenderCb function, which the user-mode display driver uses to submit a command buffer to the display miniport driver.

pfnLockCb

A pointer to the pfnLockCb function, which the user-mode display driver uses to request a lock from the display miniport driver. This lock cannot be handled completely by the user-mode display driver.

pfnUnlockCb

A pointer to the pfnUnlockCb function, which the user-mode display driver uses to call the display miniport driver for an unlock. This unlock cannot be handled completely by the user-mode display driver.

pfnEscapeCb

A pointer to the pfnEscapeCb function, which the user-mode display driver uses to share information with the display miniport driver.

pfnCreateOverlayCb

A pointer to the pfnCreateOverlayCb function, which the user-mode display driver uses to create and display a kernel-mode overlay object.

pfnUpdateOverlayCb

A pointer to the pfnUpdateOverlayCb function, which the user-mode display driver uses to modify a kernel-mode overlay object.

pfnFlipOverlayCb

A pointer to the pfnFlipOverlayCb function, which the user-mode display driver uses to change the allocation that the overlay displays.

pfnDestroyOverlayCb

A pointer to the pfnDestroyOverlayCb function, which the user-mode display driver uses to destroy a kernel-mode overlay object and stop the overlay from being displayed.

pfnCreateContextCb

A pointer to the pfnCreateContextCb function, which the user-mode display driver uses to create a context to submit requests to.

pfnDestroyContextCb

A pointer to the pfnDestroyContextCb function, which the user-mode display driver uses to destroy a context that pfnCreateContextCb created.

pfnCreateSynchronizationObjectCb

A pointer to the pfnCreateSynchronizationObjectCb function, which the user-mode display driver uses to create a synchronization object.

pfnDestroySynchronizationObjectCb

A pointer to the pfnDestroySynchronizationObjectCb function, which the user-mode display driver uses to destroy a synchronization object that pfnCreateSynchronizationObjectCb created.

pfnWaitForSynchronizationObjectCb

A pointer to the pfnWaitForSynchronizationObjectCb function, which the user-mode display driver uses to wait for synchronization events to occur and then uses to return.

pfnSignalSynchronizationObjectCb

A pointer to the pfnSignalSynchronizationObjectCb function, which the user-mode display driver uses to signal that synchronization events are no longer owned by a context.

pfnSetAsyncCallbacksCb

A pointer to the pfnSetAsyncCallbacksCb function that the user-mode display driver uses to notify the Direct3D runtime whether the runtime will start or stop receiving calls to the runtime's callback functions from a worker thread.

Only DirectX 9 and Direct 9L versions of the runtime support the pfnSetAsyncCallbacksCb function. DirectX 10 and later versions of the runtime set the pfnSetAsyncCallbacksCb member to NULL when the runtime calls the user-mode display driver's CreateDevice(D3D10) function to create a rendering device.

pfnSetDisplayPrivateDriverFormatCb

A pointer to the pfnSetDisplayPrivateDriverFormatCb function that the user-mode display driver uses to change the format of the shared primary surface.

pfnOfferAllocationsCb

A pointer to the pfnOfferAllocationsCb function, which a WDDM 1.2 and later user-mode display driver calls to offer video memory allocations for reuse.

Supported starting with Windows 8.

pfnReclaimAllocationsCb

A pointer to the pfnReclaimAllocationsCb function, which a WDDM 1.2 and later user-mode display driver calls to reclaim access to video memory allocations that were previously offered for reuse.

Supported starting with Windows 8.

pfnCreateSynchronizationObject2Cb

A pointer to the pfnCreateSynchronizationObject2Cb function, which a WDDM 1.2 and later user-mode display driver uses to create a GPU synchronization object.

Supported starting with Windows 8.

pfnWaitForSynchronizationObject2Cb

A pointer to the pfnWaitForSynchronizationObject2Cb function, which a WDDM 1.2 and later user-mode display driver uses to wait for GPU synchronization events to occur and then uses to return.

Supported starting with Windows 8.

pfnSignalSynchronizationObject2Cb

A pointer to the pfnSignalSynchronizationObject2Cb function, which a WDDM 1.2 and later user-mode display driver uses to signal that GPU synchronization events are no longer owned by a context.

Supported starting with Windows 8.

pfnPresentMultiPlaneOverlayCb

A pointer to the pfnPresentMultiPlaneOverlayCb (D3D) function, which a WDDM 1.3 and later user-mode display driver uses to copy content from a source multiplane overlay allocation to a destination allocation.

Supported starting with Windows 8.1.

pfnLogUMDMarkerCb

A pointer to the pfnLogUMDMarkerCb function, which a WDDM 1.3 and later user-mode display driver calls to log a custom Event Tracing for Windows (ETW) marker event.

Supported starting with Windows 8.1.

Remarks

The following code, from D3dumddi.h, shows the function declarations for the callback functions that the members of D3DDDI_DEVICECALLBACKS point to.


typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_ALLOCATECB)(
        _In_ HANDLE hDevice, _Inout_ D3DDDICB_ALLOCATE*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_DEALLOCATECB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_DEALLOCATE*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_SETPRIORITYCB)(
        _In_ HANDLE hDevice, _In_ D3DDDICB_SETPRIORITY*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_QUERYRESIDENCYCB)(
        _In_ HANDLE hDevice, _Inout_ CONST D3DDDICB_QUERYRESIDENCY*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_SETDISPLAYMODECB)(
        _In_ HANDLE hDevice, _Inout_ D3DDDICB_SETDISPLAYMODE*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_SETDISPLAYPRIVATEDRIVERFORMATCB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_SETDISPLAYPRIVATEDRIVERFORMAT*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_PRESENTCB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_PRESENT*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_RENDERCB)(
        _In_ HANDLE hDevice, _Inout_ D3DDDICB_RENDER*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_LOCKCB)(
        _In_ HANDLE hDevice, _Inout_ D3DDDICB_LOCK*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_UNLOCKCB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_UNLOCK*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_ESCAPECB)(
        _In_ HANDLE hAdapter, _Inout_ CONST D3DDDICB_ESCAPE*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_CREATEOVERLAYCB)(
        _In_ HANDLE hDevice, _Inout_ D3DDDICB_CREATEOVERLAY*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_UPDATEOVERLAYCB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_UPDATEOVERLAY*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_FLIPOVERLAYCB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_FLIPOVERLAY*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_DESTROYOVERLAYCB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_DESTROYOVERLAY*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_CREATECONTEXTCB)(
        _In_ HANDLE hDevice, _Inout_ D3DDDICB_CREATECONTEXT*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_DESTROYCONTEXTCB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_DESTROYCONTEXT*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_CREATESYNCHRONIZATIONOBJECTCB)(
        _In_ HANDLE hDevice, _Inout_ D3DDDICB_CREATESYNCHRONIZATIONOBJECT*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_DESTROYSYNCHRONIZATIONOBJECTCB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_DESTROYSYNCHRONIZATIONOBJECT*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_WAITFORSYNCHRONIZATIONOBJECTCB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_WAITFORSYNCHRONIZATIONOBJECT*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_SIGNALSYNCHRONIZATIONOBJECTCB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_SIGNALSYNCHRONIZATIONOBJECT*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_SETASYNCCALLBACKSCB)(
        _In_ HANDLE hDevice, _In_ BOOL Enable);
#if (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WIN8)
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_CREATESYNCHRONIZATIONOBJECT2CB)(
        _In_ HANDLE hDevice, _Inout_ D3DDDICB_CREATESYNCHRONIZATIONOBJECT2*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_WAITFORSYNCHRONIZATIONOBJECT2CB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_WAITFORSYNCHRONIZATIONOBJECT2*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_SIGNALSYNCHRONIZATIONOBJECT2CB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_SIGNALSYNCHRONIZATIONOBJECT2*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_OFFERALLOCATIONSCB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_OFFERALLOCATIONS*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_RECLAIMALLOCATIONSCB)(
        _In_ HANDLE hDevice, _Inout_ CONST D3DDDICB_RECLAIMALLOCATIONS*);
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_PRESENTMULTIPLANEOVERLAYCB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_PRESENTMULTIPLANEOVERLAY*);
#endif
#if (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM1_3)
typedef _Check_return_ HRESULT (APIENTRY CALLBACK *PFND3DDDI_LOGUMDMARKERCB)(
        _In_ HANDLE hDevice, _In_ CONST D3DDDICB_LOGUMDMARKER*);
#endif

Requirements

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

D3dumddi.h (include D3dumddi.h)

See also

CreateDevice
CreateDevice(D3D10)
pfnAllocateCb
pfnCreateContextCb
pfnCreateOverlayCb
pfnCreateSynchronizationObjectCb
pfnCreateSynchronizationObject2Cb
pfnDeallocateCb
pfnDestroyContextCb
pfnDestroyOverlayCb
pfnDestroySynchronizationObjectCb
pfnEscapeCb
pfnFlipOverlayCb
pfnLockCb
pfnLogUMDMarkerCb
pfnPresentCb
pfnQueryResidencyCb
pfnRenderCb
pfnSetAsyncCallbacksCb
pfnSetDisplayModeCb
pfnSetDisplayPrivateDriverFormatCb
pfnSetPriorityCb
pfnSignalSynchronizationObjectCb
pfnSignalSynchronizationObject2Cb
pfnUnlockCb
pfnUpdateOverlayCb
pfnWaitForSynchronizationObjectCb
pfnWaitForSynchronizationObject2Cb
pfnPresentMultiPlaneOverlayCb (D3D)

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft