D3DDDI_DEVICECALLBACKS structure (d3dumddi.h)

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;
  PFND3DDDI_OFFERALLOCATIONSCB                    pfnOfferAllocationsCb;
  PFND3DDDI_RECLAIMALLOCATIONSCB                  pfnReclaimAllocationsCb;
  PFND3DDDI_CREATESYNCHRONIZATIONOBJECT2CB        pfnCreateSynchronizationObject2Cb;
  PFND3DDDI_WAITFORSYNCHRONIZATIONOBJECT2CB       pfnWaitForSynchronizationObject2Cb;
  PFND3DDDI_SIGNALSYNCHRONIZATIONOBJECT2CB        pfnSignalSynchronizationObject2Cb;
  PFND3DDDI_PRESENTMULTIPLANEOVERLAYCB            pfnPresentMultiPlaneOverlayCb;
  PFND3DDDI_LOGUMDMARKERCB                        pfnLogUMDMarkerCb;
  PFND3DDDI_MAKERESIDENTCB                        pfnMakeResidentCb;
  PFND3DDDI_EVICTCB                               pfnEvictCb;
  PFND3DDDI_WAITFORSYNCHRONIZATIONOBJECTFROMCPUCB pfnWaitForSynchronizationObjectFromCpuCb;
  PFND3DDDI_SIGNALSYNCHRONIZATIONOBJECTFROMCPUCB  pfnSignalSynchronizationObjectFromCpuCb;
  PFND3DDDI_WAITFORSYNCHRONIZATIONOBJECTFROMGPUCB pfnWaitForSynchronizationObjectFromGpuCb;
  PFND3DDDI_SIGNALSYNCHRONIZATIONOBJECTFROMGPUCB  pfnSignalSynchronizationObjectFromGpuCb;
  PFND3DDDI_CREATEPAGINGQUEUECB                   pfnCreatePagingQueueCb;
  PFND3DDDI_DESTROYPAGINGQUEUECB                  pfnDestroyPagingQueueCb;
  PFND3DDDI_LOCK2CB                               pfnLock2Cb;
  PFND3DDDI_UNLOCK2CB                             pfnUnlock2Cb;
  PFND3DDDI_INVALIDATECACHECB                     pfnInvalidateCacheCb;
  PFND3DDDI_RESERVEGPUVIRTUALADDRESSCB            pfnReserveGpuVirtualAddressCb;
  PFND3DDDI_MAPGPUVIRTUALADDRESSCB                pfnMapGpuVirtualAddressCb;
  PFND3DDDI_FREEGPUVIRTUALADDRESSCB               pfnFreeGpuVirtualAddressCb;
  PFND3DDDI_UPDATEGPUVIRTUALADDRESSCB             pfnUpdateGpuVirtualAddressCb;
  PFND3DDDI_CREATECONTEXTVIRTUALCB                pfnCreateContextVirtualCb;
  PFND3DDDI_SUBMITCOMMANDCB                       pfnSubmitCommandCb;
  PFND3DDDI_DEALLOCATE2CB                         pfnDeallocate2Cb;
  PFND3DDDI_SIGNALSYNCHRONIZATIONOBJECTFROMGPU2CB pfnSignalSynchronizationObjectFromGpu2Cb;
  PFND3DDDI_RECLAIMALLOCATIONS2CB                 pfnReclaimAllocations2Cb;
  PFND3DDDI_GETRESOURCEPRESENTPRIVATEDRIVERDATACB pfnGetResourcePresentPrivateDriverDataCb;
  PFND3DDDI_UPDATEALLOCATIONPROPERTYCB            pfnUpdateAllocationPropertyCb;
  PFND3DDDI_OFFERALLOCATIONS2CB                   pfnOfferAllocations2Cb;
  PFND3DDDI_RECLAIMALLOCATIONS3CB                 pfnReclaimAllocations3Cb;
  PFND3DDDI_SYNCTOKENCB                           pfnAcquireResourceCb;
  PFND3DDDI_SYNCTOKENCB                           pfnReleaseResourceCb;
  PFND3DDDI_CREATEHWCONTEXTCB                     pfnCreateHwContextCb;
  PFND3DDDI_DESTROYHWCONTEXTCB                    pfnDestroyHwContextCb;
  PFND3DDDI_CREATEHWQUEUECB                       pfnCreateHwQueueCb;
  PFND3DDDI_DESTROYHWQUEUECB                      pfnDestroyHwQueueCb;
  PFND3DDDI_SUBMITCOMMANDTOHWQUEUECB              pfnSubmitCommandToHwQueueCb;
  PFND3DDDI_SUBMITWAITFORSYNCOBJECTSTOHWQUEUECB   pfnSubmitWaitForSyncObjectsToHwQueueCb;
  PFND3DDDI_SUBMITSIGNALSYNCOBJECTSTOHWQUEUECB    pfnSubmitSignalSyncObjectsToHwQueueCb;
  PFND3DDDI_SUBMITPRESENTBLTTOHWQUEUECB           pfnSubmitPresentBltToHwQueueCb;
  PFND3DDDI_SUBMITPRESENTTOHWQUEUECB              pfnSubmitPresentToHwQueueCb;
  PFND3DDDI_SUBMITHISTORYSEQUENCECB               pfnSubmitHistorySequenceCb;
} 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.

pfnMakeResidentCb

A pointer to the pfnMakeResidentCb function.

pfnEvictCb

A pointer to the pfnEvictCb function.

pfnWaitForSynchronizationObjectFromCpuCb

A pointer to the pfnWaitForSynchronizationObjectFromCpuCb function.

pfnSignalSynchronizationObjectFromCpuCb

A pointer to the pfnSignalSynchronizationObjectFromCpuCb function.

pfnWaitForSynchronizationObjectFromGpuCb

A pointer to the pfnWaitForSynchronizationObjectFromGpuCb function.

pfnSignalSynchronizationObjectFromGpuCb

A pointer to the pfnSignalSynchronizationObjectFromGpuCb function.

pfnCreatePagingQueueCb

A pointer to the pfnCreatePagingQueueCb function.

pfnDestroyPagingQueueCb

A pointer to the pfnDestroyPagingQueueCb function.

pfnLock2Cb

A pointer to the pfnLock2Cb function.

pfnUnlock2Cb

A pointer to the pfnUnlock2Cb function.

pfnInvalidateCacheCb

A pointer to the pfnInvalidateCacheCb function.

pfnReserveGpuVirtualAddressCb

A pointer to the pfnReserveGpuVirtualAddressCb function.

pfnMapGpuVirtualAddressCb

A pointer to the pfnMapGpuVirtualAddressCb function.

pfnFreeGpuVirtualAddressCb

A pointer to the pfnFreeGpuVirtualAddressCb function.

pfnUpdateGpuVirtualAddressCb

A pointer to the pfnUpdateGpuVirtualAddressCb function.

pfnCreateContextVirtualCb

A pointer to the pfnCreateContextVirtualCb function.

pfnSubmitCommandCb

A pointer to the pfnSubmitCommandCb function.

pfnDeallocate2Cb

A pointer to the pfnDeallocate2Cb function.

pfnSignalSynchronizationObjectFromGpu2Cb

A pointer to the pfnSignalSynchronizationObjectFromGpu2Cb function.

pfnReclaimAllocations2Cb

A pointer to the pfnReclaimAllocations2Cb function.

pfnGetResourcePresentPrivateDriverDataCb

A pointer to the pfnGetResourcePresentPrivateDriverDataCb function.

pfnUpdateAllocationPropertyCb

A pointer to the pfnUpdateAllocationPropertyCb function.

pfnOfferAllocations2Cb

A pointer to the pfnOfferAllocations2Cb function.

pfnReclaimAllocations3Cb

A pointer to the pfnReclaimAllocations3Cb function.

pfnAcquireResourceCb

pfnReleaseResourceCb

pfnCreateHwContextCb

A pointer to a PFND3DDDI_CREATEHWCONTEXTCB callback function.

pfnDestroyHwContextCb

A pointer to a PFND3DDDI_DESTROYHWCONTEXTCB callback function.

pfnCreateHwQueueCb

A pointer to a PFND3DDDI_CREATEHWQUEUECB callback function.

pfnDestroyHwQueueCb

A pointer to a PFND3DDDI_DESTROYHWQUEUECB callback function.

pfnSubmitCommandToHwQueueCb

A pointer to a PFND3DDDI_SUBMITCOMMANDTOHWQUEUECB callback function.

pfnSubmitWaitForSyncObjectsToHwQueueCb

A pointer to a PFND3DDDI_SUBMITWAITFORSYNCOBJECTSTOHWQUEUECB callback function.

pfnSubmitSignalSyncObjectsToHwQueueCb

A pointer to a PFND3DDDI_SUBMITSIGNALSYNCOBJECTSTOHWQUEUECB callback function.

pfnSubmitPresentBltToHwQueueCb

A pointer to a PFND3DDDI_SUBMITPRESENTBLTTOHWQUEUECB callback function.

pfnSubmitPresentToHwQueueCb

Pointer to a PFND3DDDI_SUBMITPRESENTTOHWQUEUECB callback function.

pfnSubmitHistorySequenceCb

Pointer to a PFND3DDDI_SUBMITHISTORYSEQUENCECB callback function.

Remarks

Declarations for the callback functions that D3DDDI_DEVICECALLBACKS members point to can be found in d3dumddi.h.

Requirements

Requirement Value
Minimum supported client Windows Vista
Header d3dumddi.h (include D3dumddi.h)