C Specification

// Provided by XR_EXT_debug_utils
typedef struct XrDebugUtilsMessengerCallbackDataEXT {
    XrStructureType                   type;
    const void*                       next;
    const char*                       messageId;
    const char*                       functionName;
    const char*                       message;
    uint32_t                          objectCount;
    XrDebugUtilsObjectNameInfoEXT*    objects;
    uint32_t                          sessionLabelCount;
    XrDebugUtilsLabelEXT*             sessionLabels;
} XrDebugUtilsMessengerCallbackDataEXT;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.

  • messageId is a NULL terminated string that identifies the message in a unique way. If the callback is triggered by a validation layer, this string corresponds the Valid Usage ID (VUID) that can be used to jump to the appropriate location in the OpenXR specification. This value may be NULL if no unique message identifier is associated with the message.

  • functionName is a NULL terminated string that identifies the OpenXR function that was executing at the time the message callback was triggered. This value may be NULL in cases where it is difficult to determine the originating OpenXR function.

  • message is a NULL terminated string detailing the trigger conditions.

  • objectCount is a count of items contained in the objects array. This may be 0.

  • objects is NULL or a pointer to an array of XrDebugUtilsObjectNameInfoEXT objects related to the detected issue. The array is roughly in order of importance, but the 0th element is always guaranteed to be the most important object for this message.

  • sessionLabelCount is a count of items contained in the sessionLabels array. This may be 0.

  • sessionLabels is NULL or a pointer to an array of XrDebugUtilsLabelEXT active in the current XrSession at the time the callback was triggered. Refer to Session Labels for more information.

Description

Valid Usage (Implicit)
  • The XR_EXT_debug_utils extension must be enabled prior to using XrDebugUtilsMessengerCallbackDataEXT

  • type must be XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT

  • next must be NULL or a valid pointer to the next structure in a structure chain

  • If messageId is not NULL, messageId must be a null-terminated UTF-8 string

  • If functionName is not NULL, functionName must be a null-terminated UTF-8 string

  • message must be a null-terminated UTF-8 string

An XrDebugUtilsMessengerCallbackDataEXT is a messenger object that handles passing along debug messages to a provided debug callback.

Note

This structure should only be considered valid during the lifetime of the triggered callback.

The labels listed inside sessionLabels are organized in time order, with the most recently generated label appearing first, and the oldest label appearing last.

See Also

Document Notes

For more information, see the OpenXR Specification

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2024, The Khronos Group Inc.