PFND3DDDI_SETMARKER - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// d3dumddi.h

PFND3DDDI_SETMARKER Pfnd3dddiSetmarker;

HRESULT Pfnd3dddiSetmarker(
  HANDLE hDevice
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-d3dumddi-pfnd3dddi_setmarker)

PFND3DDDI_SETMARKER callback function

Description

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.

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.

See also

SetMarker

pfnSetMarkerMode