Inserts a marker into the CPU timeline in the PIX System Timing Capture window, when a particular user-defined event occurs.
void PIXSetMarker(
DWORD Metadata,
const WCHAR *formatString,
va_list arglist
)
Metadata
Type: DWORD
The color that will be used in the timing chart when this event occurs in PIX windows.
Use PIX_COLOR to specify a color, use PIX_COLOR_INDEX to specify a color index, or pass in a raw DWORD noting that the format is ARGB and the alpha channel value must be 0xff.
formatString
Type: WCHAR *
The name to use to describe the event, as a pointer to a Unicode null-terminated string.
The string may specify zero or more optional string format placeholders, very similar to sprintf formatting.
If the event name is not available at compile time, the title code needs to convert the event name at runtime to Unicode before passing the event name.
arglist
Type: va_list
If placeholders are used in formatString, there must be a corresponding number of parameters (up to a maximum of 16) whose types match the placeholders.
C is no longer supported, functions turn into no-ops if __cplusplus is not defined. The PIXSetMarker function saves format string and format parameters instead of formatting the string at runtime. Formatting is then done when reading capture file in PIX. Use 16-byte aligned strings (preferable) or 8-byte aligned strings with PIXSetMarker to get the best performance. To print a char* or wchar_t* as a pointer using %p format specifier, cast pointer to void* or a pointer to an integral or a floating point type when passing it to PIXSetMarker. Any call to PIXSetMarker has guaranteed at least 512 bytes of space to save the record data.
The event will be shown as having no duration, and will be represented by a single line (a single vertical bar) in the PIX System Timing Capture window.
This function is used to mark events in the CPU timeline. To mark events in the GPU timeline, call the methods ID3D11DeviceContextX::PIXSetMarker or ID3D11ComputeContextX::PIXSetMarker.
Calls to PIXSetMarker can occur anywhere, and do not have to follow a call to PIXBeginEvent.
Header: Declared in pix.h.
Library: Use PIXEvt.lib.
ID3D11DeviceContextX::PIXSetMarker