PFND3DWDDM1_3DDI_SETMARKER callback function

Notifies the user-mode display driver that it must generate a new time stamp if any GPU work has completed since the last call to SetMarker.



_Check_return_ HRESULT APIENTRY* SetMarker(
  _In_ D3D10DDI_HDEVICE hDevice
{ ... }


hDevice [in]

A handle to the display device (graphics context).

Return value

Returns S_OK or an appropriate error result if the function does not complete successfully.


If the marker event type from the Type parameter of the SetMarkerMode function is not D3DWDDM1_3DDI_MARKER_TYPE_NONE, the user-mode display driver must perform this procedure with each call to SetMarker:

  1. Increment the value of the APISequenceNumber member of the D3DDDICB_LOGUMDMARKER structure.
  2. Determine which contexts associated with single-threaded device driver interface (DDI) render calls submitted work with the last call to SetMarker. For each such context:
    1. If the command buffer for the context is empty, do nothing.
    2. Otherwise:
      • Ensure that more memory is available in the context's history buffer. Flush the buffer if necessary.
      • Add another entry to the context's API sequence number buffer that contains the low 32 bits of the current APISequenceNumber value.
      • Sample and write out time stamps that are appropriate for the current marker event type.
    3. Update tracking data that will be used the next time that SetMarker is called.


Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Target platform



WDDM 1.3 and later


D3d10umddi.h (include D3d10umddi.h)

See also




Send comments about this topic to Microsoft