PFND3DDDI_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 pfnSetMarker. Optionally implemented by Windows Display Driver Model (WDDM) 1.3 and later drivers running on Microsoft Direct3D Level 9 hardware. (See requirements in Direct3D rendering performance improvements.) For more advanced hardware, drivers should implement the SetMarker function.

Syntax

PFND3DDDI_SETMARKER Pfnd3dddiSetmarker;

HRESULT Pfnd3dddiSetmarker(
  HANDLE hDevice
)
{...}

Parameters

hDevice

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.

Remarks

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

  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 pfnSetMarker. 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 pfnSetMarker is called.

Requirements

   
Minimum supported client Windows 8.1,WDDM 1.3 and later
Minimum supported server Windows Server 2012 R2
Target Platform Desktop
Header d3dumddi.h (include D3d10umddi.h)

See Also

SetMarker

pfnSetMarkerMode