Class EXTDebugUtils
Due to the nature of the OpenXR interface, there is very little error information available to the developer and application. By using the XR_EXT_debug_utils extension, developers can obtain more information. When combined with validation layers, even more detailed feedback on the application’s use of OpenXR will be provided.
This extension provides the following capabilities:
- The ability to create a debug messenger which will pass along debug messages to an application supplied callback.
- The ability to identify specific OpenXR handles using a name to improve tracking.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intXrDebugUtilsMessageSeverityFlagBitsEXT - XrDebugUtilsMessageSeverityFlagBitsEXTstatic final intXrDebugUtilsMessageSeverityFlagBitsEXT - XrDebugUtilsMessageSeverityFlagBitsEXTstatic final intXrDebugUtilsMessageSeverityFlagBitsEXT - XrDebugUtilsMessageSeverityFlagBitsEXTstatic final intXrDebugUtilsMessageSeverityFlagBitsEXT - XrDebugUtilsMessageSeverityFlagBitsEXTstatic final intXrDebugUtilsMessageTypeFlagBitsEXT - XrDebugUtilsMessageTypeFlagBitsEXTstatic final intXrDebugUtilsMessageTypeFlagBitsEXT - XrDebugUtilsMessageTypeFlagBitsEXTstatic final intXrDebugUtilsMessageTypeFlagBitsEXT - XrDebugUtilsMessageTypeFlagBitsEXTstatic final intXrDebugUtilsMessageTypeFlagBitsEXT - XrDebugUtilsMessageTypeFlagBitsEXTstatic final StringThe extension name.static final intThe extension specification version.static final intExtendsXrObjectType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrCreateDebugUtilsMessengerEXT(org.lwjgl.openxr.XrInstance instance, long createInfo, long messenger) Unsafe version of:CreateDebugUtilsMessengerEXTstatic intnxrSessionBeginDebugUtilsLabelRegionEXT(XrSession session, long labelInfo) Unsafe version of:SessionBeginDebugUtilsLabelRegionEXTstatic intnxrSessionInsertDebugUtilsLabelEXT(XrSession session, long labelInfo) Unsafe version of:SessionInsertDebugUtilsLabelEXTstatic intnxrSetDebugUtilsObjectNameEXT(org.lwjgl.openxr.XrInstance instance, long nameInfo) Unsafe version of:SetDebugUtilsObjectNameEXTstatic intnxrSubmitDebugUtilsMessageEXT(org.lwjgl.openxr.XrInstance instance, long messageSeverity, long messageTypes, long callbackData) Unsafe version of:SubmitDebugUtilsMessageEXTstatic intxrCreateDebugUtilsMessengerEXT(org.lwjgl.openxr.XrInstance instance, XrDebugUtilsMessengerCreateInfoEXT createInfo, org.lwjgl.PointerBuffer messenger) Creates a debug messenger.static intDestroys a debug messenger.static intxrSessionBeginDebugUtilsLabelRegionEXT(XrSession session, XrDebugUtilsLabelEXT labelInfo) Session begin debug utils label region.static intSession end debug utils label region.static intxrSessionInsertDebugUtilsLabelEXT(XrSession session, XrDebugUtilsLabelEXT labelInfo) Session insert debug utils label.static intxrSetDebugUtilsObjectNameEXT(org.lwjgl.openxr.XrInstance instance, XrDebugUtilsObjectNameInfoEXT nameInfo) Sets debug utils object name.static intxrSubmitDebugUtilsMessageEXT(org.lwjgl.openxr.XrInstance instance, long messageSeverity, long messageTypes, XrDebugUtilsMessengerCallbackDataEXT callbackData) Submits debug utils message.
-
Field Details
-
XR_EXT_debug_utils_SPEC_VERSION
public static final int XR_EXT_debug_utils_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_EXT_DEBUG_UTILS_EXTENSION_NAME
The extension name.- See Also:
-
XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT
public static final int XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXTExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT
public static final int XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXTExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT
public static final int XR_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXTExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_DEBUG_UTILS_LABEL_EXT
public static final int XR_TYPE_DEBUG_UTILS_LABEL_EXTExtendsXrStructureType.Enum values:
- See Also:
-
XR_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT
public static final int XR_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXTExtendsXrObjectType.- See Also:
-
XR_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT
public static final int XR_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXTXrDebugUtilsMessageSeverityFlagBitsEXT - XrDebugUtilsMessageSeverityFlagBitsEXTEnum values:
- See Also:
-
XR_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT
public static final int XR_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXTXrDebugUtilsMessageSeverityFlagBitsEXT - XrDebugUtilsMessageSeverityFlagBitsEXTEnum values:
- See Also:
-
XR_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT
public static final int XR_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXTXrDebugUtilsMessageSeverityFlagBitsEXT - XrDebugUtilsMessageSeverityFlagBitsEXTEnum values:
- See Also:
-
XR_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT
public static final int XR_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXTXrDebugUtilsMessageSeverityFlagBitsEXT - XrDebugUtilsMessageSeverityFlagBitsEXTEnum values:
- See Also:
-
XR_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT
public static final int XR_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXTXrDebugUtilsMessageTypeFlagBitsEXT - XrDebugUtilsMessageTypeFlagBitsEXTEnum values:
- See Also:
-
XR_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT
public static final int XR_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXTXrDebugUtilsMessageTypeFlagBitsEXT - XrDebugUtilsMessageTypeFlagBitsEXTEnum values:
- See Also:
-
XR_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT
public static final int XR_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXTXrDebugUtilsMessageTypeFlagBitsEXT - XrDebugUtilsMessageTypeFlagBitsEXTEnum values:
- See Also:
-
XR_DEBUG_UTILS_MESSAGE_TYPE_CONFORMANCE_BIT_EXT
public static final int XR_DEBUG_UTILS_MESSAGE_TYPE_CONFORMANCE_BIT_EXTXrDebugUtilsMessageTypeFlagBitsEXT - XrDebugUtilsMessageTypeFlagBitsEXTEnum values:
- See Also:
-
-
Method Details
-
nxrSetDebugUtilsObjectNameEXT
public static int nxrSetDebugUtilsObjectNameEXT(org.lwjgl.openxr.XrInstance instance, long nameInfo) Unsafe version of:SetDebugUtilsObjectNameEXT -
xrSetDebugUtilsObjectNameEXT
public static int xrSetDebugUtilsObjectNameEXT(org.lwjgl.openxr.XrInstance instance, XrDebugUtilsObjectNameInfoEXT nameInfo) Sets debug utils object name.C Specification
XrResult xrSetDebugUtilsObjectNameEXT( XrInstance instance, const XrDebugUtilsObjectNameInfoEXT* nameInfo);Valid Usage
- In the structure pointed to by
nameInfo,XrDebugUtilsObjectNameInfoEXT::objectTypemust not beOBJECT_TYPE_UNKNOWN - In the structure pointed to by
nameInfo,XrDebugUtilsObjectNameInfoEXT::objectHandlemust not beNULL_HANDLE
Valid Usage (Implicit)
- The
XR_EXT_debug_utilsextension must be enabled prior to callingSetDebugUtilsObjectNameEXT instancemust be a validXrInstancehandlenameInfomust be a pointer to a validXrDebugUtilsObjectNameInfoEXTstructure
Thread Safety
- Access to the
objectHandlemember of thenameInfoparameter must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
Applications may change the name associated with an object simply by calling
SetDebugUtilsObjectNameEXTagain with a new string. IfXrDebugUtilsObjectNameInfoEXT::objectNameis an empty string, then any previously set name is removed.See Also
- Parameters:
instance- theXrInstancethat the object was created under.nameInfo- a pointer to an instance of theXrDebugUtilsObjectNameInfoEXTstructure specifying the parameters of the name to set on the object.
- In the structure pointed to by
-
nxrCreateDebugUtilsMessengerEXT
public static int nxrCreateDebugUtilsMessengerEXT(org.lwjgl.openxr.XrInstance instance, long createInfo, long messenger) Unsafe version of:CreateDebugUtilsMessengerEXT -
xrCreateDebugUtilsMessengerEXT
public static int xrCreateDebugUtilsMessengerEXT(org.lwjgl.openxr.XrInstance instance, XrDebugUtilsMessengerCreateInfoEXT createInfo, org.lwjgl.PointerBuffer messenger) Creates a debug messenger.C Specification
XrResult xrCreateDebugUtilsMessengerEXT( XrInstance instance, const XrDebugUtilsMessengerCreateInfoEXT* createInfo, XrDebugUtilsMessengerEXT* messenger);Valid Usage (Implicit)
- The
XR_EXT_debug_utilsextension must be enabled prior to callingCreateDebugUtilsMessengerEXT instancemust be a validXrInstancehandlecreateInfomust be a pointer to a validXrDebugUtilsMessengerCreateInfoEXTstructuremessengermust be a pointer to anXrDebugUtilsMessengerEXThandle
Thread Safety
- Access to
instance, and any child handles, must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
The application must ensure that
CreateDebugUtilsMessengerEXTis not executed in parallel with any OpenXR function that is also called withinstanceor child ofinstance.When an event of interest occurs a debug messenger calls its
XrDebugUtilsMessengerCreateInfoEXT::userCallbackwith a debug message from the producer of the event. Additionally, the debug messenger must filter out any debug messages that the application’s callback is not interested in based onXrDebugUtilsMessengerCreateInfoEXTflags, as described below.See Also
XrDebugUtilsMessengerCreateInfoEXT,DestroyDebugUtilsMessengerEXT- Parameters:
instance- the instance the messenger will be used with.createInfo- points to anXrDebugUtilsMessengerCreateInfoEXTstructure, which contains the callback pointer as well as defines the conditions under which this messenger will trigger the callback.messenger- a pointer to which the createdXrDebugUtilsMessengerEXTobject is returned.
- The
-
xrDestroyDebugUtilsMessengerEXT
Destroys a debug messenger.C Specification
XrResult xrDestroyDebugUtilsMessengerEXT( XrDebugUtilsMessengerEXT messenger);Valid Usage (Implicit)
- The
XR_EXT_debug_utilsextension must be enabled prior to callingDestroyDebugUtilsMessengerEXT messengermust be a validXrDebugUtilsMessengerEXThandle
Thread Safety
- Access to
messengermust be externally synchronized - Access to the
XrInstanceused to createmessenger, and all of its child handles must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
The application must ensure that
DestroyDebugUtilsMessengerEXTis not executed in parallel with any OpenXR function that is also called with theinstanceor child ofinstancethat it was created with.See Also
- Parameters:
messenger- theXrDebugUtilsMessengerEXTobject to destroy.messengeris an externally synchronized object and must not be used on more than one thread at a time. This means thatDestroyDebugUtilsMessengerEXTmust not be called when a callback is active.
- The
-
nxrSubmitDebugUtilsMessageEXT
public static int nxrSubmitDebugUtilsMessageEXT(org.lwjgl.openxr.XrInstance instance, long messageSeverity, long messageTypes, long callbackData) Unsafe version of:SubmitDebugUtilsMessageEXT -
xrSubmitDebugUtilsMessageEXT
public static int xrSubmitDebugUtilsMessageEXT(org.lwjgl.openxr.XrInstance instance, long messageSeverity, long messageTypes, XrDebugUtilsMessengerCallbackDataEXT callbackData) Submits debug utils message.C Specification
XrResult xrSubmitDebugUtilsMessageEXT( XrInstance instance, XrDebugUtilsMessageSeverityFlagsEXT messageSeverity, XrDebugUtilsMessageTypeFlagsEXT messageTypes, const XrDebugUtilsMessengerCallbackDataEXT* callbackData);Valid Usage
- For each structure in
XrDebugUtilsMessengerCallbackDataEXT::objects, the value ofXrDebugUtilsObjectNameInfoEXT::objectTypemust not beOBJECT_TYPE_UNKNOWN
Valid Usage (Implicit)
- The
XR_EXT_debug_utilsextension must be enabled prior to callingSubmitDebugUtilsMessageEXT instancemust be a validXrInstancehandlemessageSeveritymust be a valid combination ofXrDebugUtilsMessageSeverityFlagBitsEXTvaluesmessageSeveritymust not be 0messageTypesmust be a valid combination ofXrDebugUtilsMessageTypeFlagBitsEXTvaluesmessageTypesmust not be 0callbackDatamust be a pointer to a validXrDebugUtilsMessengerCallbackDataEXTstructure
Return Codes
- On success, this command returns
- On failure, this command returns
The application can also produce a debug message, and submit it into the OpenXR messaging system.
The call will propagate through the layers and generate callback(s) as indicated by the message’s flags. The parameters are passed on to the callback in addition to the userData value that was defined at the time the messenger was created.
See Also
- Parameters:
instance- the debug stream’sXrInstance.messageSeverity- a single bit value ofXrDebugUtilsMessageSeverityFlagsEXTseverity of this event/message.messageTypes- anXrDebugUtilsMessageTypeFlagsEXTbitmask ofXrDebugUtilsMessageTypeFlagBitsEXTspecifying which types of event to identify this message with.callbackData- contains all the callback related data in theXrDebugUtilsMessengerCallbackDataEXTstructure.
- For each structure in
-
nxrSessionBeginDebugUtilsLabelRegionEXT
Unsafe version of:SessionBeginDebugUtilsLabelRegionEXT -
xrSessionBeginDebugUtilsLabelRegionEXT
public static int xrSessionBeginDebugUtilsLabelRegionEXT(XrSession session, XrDebugUtilsLabelEXT labelInfo) Session begin debug utils label region.C Specification
XrResult xrSessionBeginDebugUtilsLabelRegionEXT( XrSession session, const XrDebugUtilsLabelEXT* labelInfo);Valid Usage (Implicit)
- The
XR_EXT_debug_utilsextension must be enabled prior to callingSessionBeginDebugUtilsLabelRegionEXT sessionmust be a validXrSessionhandlelabelInfomust be a pointer to a validXrDebugUtilsLabelEXTstructure
Return Codes
- On success, this command returns
- On failure, this command returns
The
SessionBeginDebugUtilsLabelRegionEXTfunction begins a label region withinsession.See Also
- Parameters:
session- theXrSessionthat a label region should be associated with.labelInfo- theXrDebugUtilsLabelEXTcontaining the label information for the region that should be begun.
- The
-
xrSessionEndDebugUtilsLabelRegionEXT
Session end debug utils label region.C Specification
XrResult xrSessionEndDebugUtilsLabelRegionEXT( XrSession session);Valid Usage
SessionEndDebugUtilsLabelRegionEXTmust be called only after a matchingSessionBeginDebugUtilsLabelRegionEXT.
Valid Usage (Implicit)
- The
XR_EXT_debug_utilsextension must be enabled prior to callingSessionEndDebugUtilsLabelRegionEXT sessionmust be a validXrSessionhandle
Return Codes
- On success, this command returns
- On failure, this command returns
This function ends the last label region begun with the
SessionBeginDebugUtilsLabelRegionEXTfunction within the samesession.- Parameters:
session- theXrSessionthat a label region should be associated with.
-
nxrSessionInsertDebugUtilsLabelEXT
Unsafe version of:SessionInsertDebugUtilsLabelEXT -
xrSessionInsertDebugUtilsLabelEXT
public static int xrSessionInsertDebugUtilsLabelEXT(XrSession session, XrDebugUtilsLabelEXT labelInfo) Session insert debug utils label.C Specification
XrResult xrSessionInsertDebugUtilsLabelEXT( XrSession session, const XrDebugUtilsLabelEXT* labelInfo);Valid Usage (Implicit)
- The
XR_EXT_debug_utilsextension must be enabled prior to callingSessionInsertDebugUtilsLabelEXT sessionmust be a validXrSessionhandlelabelInfomust be a pointer to a validXrDebugUtilsLabelEXTstructure
Return Codes
- On success, this command returns
- On failure, this command returns
The
SessionInsertDebugUtilsLabelEXTfunction inserts an individual label withinsession. The individual labels are useful for different reasons based on the type of debugging scenario. When used with something active like a profiler or debugger, it identifies a single point of time. When used with logging, the individual label identifies that a particular location has been passed at the point the log message is triggered. Because of this usage, individual labels only exist in a log until the next call to any of the label functions:SessionBeginDebugUtilsLabelRegionEXTSessionEndDebugUtilsLabelRegionEXTSessionInsertDebugUtilsLabelEXT
See Also
XrDebugUtilsLabelEXT,SessionBeginDebugUtilsLabelRegionEXT,SessionEndDebugUtilsLabelRegionEXT- Parameters:
session- theXrSessionthat a label region should be associated with.labelInfo- theXrDebugUtilsLabelEXTcontaining the label information for the region that should be begun.
- The
-