openxr-0.1: Bindings to the OpenXR API
Safe HaskellNone
LanguageHaskell2010

OpenXR.Extensions.XR_EXT_debug_utils

Description

Name

XR_EXT_debug_utils - instance extension

Specification

See XR_EXT_debug_utils in the main specification for complete information.

Registered Extension Number

20

Revision

3

Extension and Version Dependencies

  • Requires OpenXR 1.0

See Also

PFN_xrDebugUtilsMessengerCallbackEXT, DebugUtilsLabelEXT, DebugUtilsMessengerCallbackDataEXT, DebugUtilsMessengerCreateInfoEXT, DebugUtilsObjectNameInfoEXT, createDebugUtilsMessengerEXT, destroyDebugUtilsMessengerEXT, sessionBeginDebugUtilsLabelRegionEXT, sessionEndDebugUtilsLabelRegionEXT, sessionInsertDebugUtilsLabelEXT, setDebugUtilsObjectNameEXT, submitDebugUtilsMessageEXT

Document Notes

For more information, see the OpenXR Specification

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

Synopsis

Documentation

setDebugUtilsObjectNameEXT Source #

Arguments

:: forall io. MonadIO io 
=> Instance

instance is the Instance that the object was created under.

-> DebugUtilsObjectNameInfoEXT

nameInfo is a pointer to an instance of the DebugUtilsObjectNameInfoEXT structure specifying the parameters of the name to set on the object.

-> io () 

xrSetDebugUtilsObjectNameEXT - Sets debug utils object name

Valid Usage

Valid Usage (Implicit)

Thread Safety

  • Access to the objectHandle member of the nameInfo parameter must be externally synchronized

Return Codes

Success
Failure

Applications may change the name associated with an object simply by calling setDebugUtilsObjectNameEXT again with a new string. If DebugUtilsObjectNameInfoEXT::objectName is an empty string, then any previously set name is removed.

See Also

DebugUtilsObjectNameInfoEXT, Instance

createDebugUtilsMessengerEXT Source #

Arguments

:: forall io. MonadIO io 
=> Instance

instance is the instance the messenger will be used with.

-> DebugUtilsMessengerCreateInfoEXT

createInfo points to an DebugUtilsMessengerCreateInfoEXT structure, which contains the callback pointer as well as defines the conditions under which this messenger will trigger the callback.

-> io DebugUtilsMessengerEXT 

xrCreateDebugUtilsMessengerEXT - Creates a debug messenger

Valid Usage (Implicit)

Thread Safety

  • Access to instance, and any child handles, must be externally synchronized

Return Codes

Success
Failure

The application must ensure that createDebugUtilsMessengerEXT is not executed in parallel with any OpenXR function that is also called with instance or child of instance.

When an event of interest occurs a debug messenger calls its createInfo->userCallback with 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 on DebugUtilsMessengerCreateInfoEXT flags, as described below.

See Also

DebugUtilsMessengerCreateInfoEXT, DebugUtilsMessengerEXT, Instance, destroyDebugUtilsMessengerEXT

withDebugUtilsMessengerEXT :: forall io r. MonadIO io => Instance -> DebugUtilsMessengerCreateInfoEXT -> (io DebugUtilsMessengerEXT -> (DebugUtilsMessengerEXT -> io ()) -> r) -> r Source #

A convenience wrapper to make a compatible pair of calls to createDebugUtilsMessengerEXT and destroyDebugUtilsMessengerEXT

To ensure that destroyDebugUtilsMessengerEXT is always called: pass bracket (or the allocate function from your favourite resource management library) as the last argument. To just extract the pair pass (,) as the last argument.

destroyDebugUtilsMessengerEXT Source #

Arguments

:: forall io. MonadIO io 
=> DebugUtilsMessengerEXT

messenger the DebugUtilsMessengerEXT object to destroy. messenger is an externally synchronized object and must not be used on more than one thread at a time. This means that destroyDebugUtilsMessengerEXT must not be called when a callback is active.

-> io () 

xrDestroyDebugUtilsMessengerEXT - Destroys a debug messenger

Valid Usage (Implicit)

Thread Safety

  • Access to messenger must be externally synchronized
  • Access to the Instance used to create messenger, and all of its child handles must be externally synchronized

Return Codes

Success
Failure

The application must ensure that destroyDebugUtilsMessengerEXT is not executed in parallel with any OpenXR function that is also called with the instance or child of instance that it was created with.

See Also

DebugUtilsMessengerEXT, createDebugUtilsMessengerEXT

submitDebugUtilsMessageEXT Source #

Arguments

:: forall io. MonadIO io 
=> Instance

instance is the debug stream’s Instance.

-> DebugUtilsMessageSeverityFlagsEXT

messageSeverity is a single bit value of DebugUtilsMessageSeverityFlagsEXT severity of this event/message.

-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)

messageTypes is an DebugUtilsMessageTypeFlagsEXT bitmask of XrDebugUtilsMessageTypeFlagBitsEXT specifying which types of event to identify this message with.

-> DebugUtilsMessengerCallbackDataEXT

callbackData contains all the callback related data in the DebugUtilsMessengerCallbackDataEXT structure.

-> io () 

xrSubmitDebugUtilsMessageEXT - Submits debug utils message

Valid Usage

Valid Usage (Implicit)

Return Codes

Success
Failure

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

DebugUtilsMessageSeverityFlagsEXT, DebugUtilsMessageTypeFlagsEXT, DebugUtilsMessengerCallbackDataEXT, Instance

sessionBeginDebugUtilsLabelRegionEXT Source #

Arguments

:: forall io. MonadIO io 
=> Session

session is the Session that a label region should be associated with.

-> ("labelInfo" ::: DebugUtilsLabelEXT)

labelInfo is the DebugUtilsLabelEXT containing the label information for the region that should be begun.

-> io Result 

xrSessionBeginDebugUtilsLabelRegionEXT - Session begin debug utils label region

Valid Usage (Implicit)

Return Codes

Success
Failure

The sessionBeginDebugUtilsLabelRegionEXT function begins a label region within session.

See Also

DebugUtilsLabelEXT, Session

sessionEndDebugUtilsLabelRegionEXT Source #

Arguments

:: forall io. MonadIO io 
=> Session

session is the Session that a label region should be associated with.

-> io Result 

xrSessionEndDebugUtilsLabelRegionEXT - Session end debug utils label region

Valid Usage

Valid Usage (Implicit)

  • session must be a valid Session handle

Return Codes

Success
Failure

This function ends the last label region begun with the sessionBeginDebugUtilsLabelRegionEXT function within the same session.

See Also

Session

sessionInsertDebugUtilsLabelEXT Source #

Arguments

:: forall io. MonadIO io 
=> Session

session is the Session that a label region should be associated with.

-> ("labelInfo" ::: DebugUtilsLabelEXT)

labelInfo is the DebugUtilsLabelEXT containing the label information for the region that should be begun.

-> io Result 

xrSessionInsertDebugUtilsLabelEXT - Session insert debug utils label

Valid Usage (Implicit)

Return Codes

Success
Failure

The sessionInsertDebugUtilsLabelEXT function inserts an individual label within session. 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:

See Also

DebugUtilsLabelEXT, Session, sessionBeginDebugUtilsLabelRegionEXT, sessionEndDebugUtilsLabelRegionEXT

data DebugUtilsObjectNameInfoEXT Source #

XrDebugUtilsObjectNameInfoEXT - Debug utils object name info

Valid Usage

Valid Usage (Implicit)

See Also

DebugUtilsMessengerCallbackDataEXT, ObjectType, StructureType, setDebugUtilsObjectNameEXT

Constructors

DebugUtilsObjectNameInfoEXT 

Fields

data DebugUtilsLabelEXT Source #

XrDebugUtilsLabelEXT - Debug Utils Label

Valid Usage (Implicit)

See Also

DebugUtilsMessengerCallbackDataEXT, StructureType, sessionBeginDebugUtilsLabelRegionEXT, sessionInsertDebugUtilsLabelEXT

Constructors

DebugUtilsLabelEXT 

Fields

data DebugUtilsMessengerCallbackDataEXT Source #

XrDebugUtilsMessengerCallbackDataEXT - Debug utils messenger callback data

Valid Usage (Implicit)

An DebugUtilsMessengerCallbackDataEXT 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

DebugUtilsLabelEXT, DebugUtilsObjectNameInfoEXT, StructureType, submitDebugUtilsMessageEXT

Constructors

DebugUtilsMessengerCallbackDataEXT 

Fields

  • messageId :: ByteString

    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 :: ByteString

    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 :: ByteString

    message is a NULL terminated string detailing the trigger conditions.

  • objectCount :: Word32

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

  • objects :: Ptr DebugUtilsObjectNameInfoEXT

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

  • sessionLabelCount :: Word32

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

  • sessionLabels :: Ptr DebugUtilsLabelEXT

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

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

data DebugUtilsMessengerCreateInfoEXT Source #

XrDebugUtilsMessengerCreateInfoEXT - Debug utils messenger create info

Valid Usage

  • userCallback must be a valid PFN_xrDebugUtilsMessengerCallbackEXT

Valid Usage (Implicit)

For each DebugUtilsMessengerEXT that is created the DebugUtilsMessengerCreateInfoEXT::messageSeverities and DebugUtilsMessengerCreateInfoEXT::messageTypes determine when that DebugUtilsMessengerCreateInfoEXT::userCallback is called. The process to determine if the user’s userCallback is triggered when an event occurs is as follows:

The callback will come directly from the component that detected the event, unless some other layer intercepts the calls for its own purposes (filter them in a different way, log to a system error log, etc.).

See Also

PFN_xrDebugUtilsMessengerCallbackEXT, DebugUtilsMessageSeverityFlagsEXT, DebugUtilsMessageTypeFlagsEXT, StructureType, createDebugUtilsMessengerEXT

Constructors

DebugUtilsMessengerCreateInfoEXT 

Fields

Instances

Instances details
Show DebugUtilsMessengerCreateInfoEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Storable DebugUtilsMessengerCreateInfoEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Zero DebugUtilsMessengerCreateInfoEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

ToCStruct DebugUtilsMessengerCreateInfoEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

FromCStruct DebugUtilsMessengerCreateInfoEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

newtype DebugUtilsMessageSeverityFlagsEXT Source #

XrDebugUtilsMessageSeverityFlagsEXT - XrDebugUtilsMessageSeverityFlagsEXT

See Also

DebugUtilsMessengerCreateInfoEXT, submitDebugUtilsMessageEXT

Instances

Instances details
Eq DebugUtilsMessageSeverityFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Ord DebugUtilsMessageSeverityFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Read DebugUtilsMessageSeverityFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Show DebugUtilsMessageSeverityFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Storable DebugUtilsMessageSeverityFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Bits DebugUtilsMessageSeverityFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Methods

(.&.) :: DebugUtilsMessageSeverityFlagsEXT -> DebugUtilsMessageSeverityFlagsEXT -> DebugUtilsMessageSeverityFlagsEXT #

(.|.) :: DebugUtilsMessageSeverityFlagsEXT -> DebugUtilsMessageSeverityFlagsEXT -> DebugUtilsMessageSeverityFlagsEXT #

xor :: DebugUtilsMessageSeverityFlagsEXT -> DebugUtilsMessageSeverityFlagsEXT -> DebugUtilsMessageSeverityFlagsEXT #

complement :: DebugUtilsMessageSeverityFlagsEXT -> DebugUtilsMessageSeverityFlagsEXT #

shift :: DebugUtilsMessageSeverityFlagsEXT -> Int -> DebugUtilsMessageSeverityFlagsEXT #

rotate :: DebugUtilsMessageSeverityFlagsEXT -> Int -> DebugUtilsMessageSeverityFlagsEXT #

zeroBits :: DebugUtilsMessageSeverityFlagsEXT #

bit :: Int -> DebugUtilsMessageSeverityFlagsEXT #

setBit :: DebugUtilsMessageSeverityFlagsEXT -> Int -> DebugUtilsMessageSeverityFlagsEXT #

clearBit :: DebugUtilsMessageSeverityFlagsEXT -> Int -> DebugUtilsMessageSeverityFlagsEXT #

complementBit :: DebugUtilsMessageSeverityFlagsEXT -> Int -> DebugUtilsMessageSeverityFlagsEXT #

testBit :: DebugUtilsMessageSeverityFlagsEXT -> Int -> Bool #

bitSizeMaybe :: DebugUtilsMessageSeverityFlagsEXT -> Maybe Int #

bitSize :: DebugUtilsMessageSeverityFlagsEXT -> Int #

isSigned :: DebugUtilsMessageSeverityFlagsEXT -> Bool #

shiftL :: DebugUtilsMessageSeverityFlagsEXT -> Int -> DebugUtilsMessageSeverityFlagsEXT #

unsafeShiftL :: DebugUtilsMessageSeverityFlagsEXT -> Int -> DebugUtilsMessageSeverityFlagsEXT #

shiftR :: DebugUtilsMessageSeverityFlagsEXT -> Int -> DebugUtilsMessageSeverityFlagsEXT #

unsafeShiftR :: DebugUtilsMessageSeverityFlagsEXT -> Int -> DebugUtilsMessageSeverityFlagsEXT #

rotateL :: DebugUtilsMessageSeverityFlagsEXT -> Int -> DebugUtilsMessageSeverityFlagsEXT #

rotateR :: DebugUtilsMessageSeverityFlagsEXT -> Int -> DebugUtilsMessageSeverityFlagsEXT #

popCount :: DebugUtilsMessageSeverityFlagsEXT -> Int #

FiniteBits DebugUtilsMessageSeverityFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Zero DebugUtilsMessageSeverityFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

newtype DebugUtilsMessageTypeFlagsEXT Source #

XrDebugUtilsMessageTypeFlagsEXT - XrDebugUtilsMessageTypeFlagsEXT

See Also

DebugUtilsMessengerCreateInfoEXT, submitDebugUtilsMessageEXT

Instances

Instances details
Eq DebugUtilsMessageTypeFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Ord DebugUtilsMessageTypeFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Read DebugUtilsMessageTypeFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Show DebugUtilsMessageTypeFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Storable DebugUtilsMessageTypeFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Bits DebugUtilsMessageTypeFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Methods

(.&.) :: DebugUtilsMessageTypeFlagsEXT -> DebugUtilsMessageTypeFlagsEXT -> DebugUtilsMessageTypeFlagsEXT #

(.|.) :: DebugUtilsMessageTypeFlagsEXT -> DebugUtilsMessageTypeFlagsEXT -> DebugUtilsMessageTypeFlagsEXT #

xor :: DebugUtilsMessageTypeFlagsEXT -> DebugUtilsMessageTypeFlagsEXT -> DebugUtilsMessageTypeFlagsEXT #

complement :: DebugUtilsMessageTypeFlagsEXT -> DebugUtilsMessageTypeFlagsEXT #

shift :: DebugUtilsMessageTypeFlagsEXT -> Int -> DebugUtilsMessageTypeFlagsEXT #

rotate :: DebugUtilsMessageTypeFlagsEXT -> Int -> DebugUtilsMessageTypeFlagsEXT #

zeroBits :: DebugUtilsMessageTypeFlagsEXT #

bit :: Int -> DebugUtilsMessageTypeFlagsEXT #

setBit :: DebugUtilsMessageTypeFlagsEXT -> Int -> DebugUtilsMessageTypeFlagsEXT #

clearBit :: DebugUtilsMessageTypeFlagsEXT -> Int -> DebugUtilsMessageTypeFlagsEXT #

complementBit :: DebugUtilsMessageTypeFlagsEXT -> Int -> DebugUtilsMessageTypeFlagsEXT #

testBit :: DebugUtilsMessageTypeFlagsEXT -> Int -> Bool #

bitSizeMaybe :: DebugUtilsMessageTypeFlagsEXT -> Maybe Int #

bitSize :: DebugUtilsMessageTypeFlagsEXT -> Int #

isSigned :: DebugUtilsMessageTypeFlagsEXT -> Bool #

shiftL :: DebugUtilsMessageTypeFlagsEXT -> Int -> DebugUtilsMessageTypeFlagsEXT #

unsafeShiftL :: DebugUtilsMessageTypeFlagsEXT -> Int -> DebugUtilsMessageTypeFlagsEXT #

shiftR :: DebugUtilsMessageTypeFlagsEXT -> Int -> DebugUtilsMessageTypeFlagsEXT #

unsafeShiftR :: DebugUtilsMessageTypeFlagsEXT -> Int -> DebugUtilsMessageTypeFlagsEXT #

rotateL :: DebugUtilsMessageTypeFlagsEXT -> Int -> DebugUtilsMessageTypeFlagsEXT #

rotateR :: DebugUtilsMessageTypeFlagsEXT -> Int -> DebugUtilsMessageTypeFlagsEXT #

popCount :: DebugUtilsMessageTypeFlagsEXT -> Int #

FiniteBits DebugUtilsMessageTypeFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

Zero DebugUtilsMessageTypeFlagsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_debug_utils

type PFN_xrDebugUtilsMessengerCallbackEXT = FunPtr FN_xrDebugUtilsMessengerCallbackEXT Source #

PFN_xrDebugUtilsMessengerCallbackEXT - Type of callback function invoked by the debug utils

Parameter Descriptions

Description

The callback must not call destroyDebugUtilsMessengerEXT.

The callback returns an https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrBool32 that indicates to the calling layer the application’s desire to abort the call. A value of TRUE indicates that the application wants to abort this call. If the application returns FALSE, the function must not be aborted. Applications should always return FALSE so that they see the same behavior with and without validation layers enabled.

If the application returns TRUE from its callback and the OpenXR call being aborted returns an Result, the layer will return ERROR_VALIDATION_FAILURE.

The object pointed to by callbackData (and any pointers in it recursively) must be valid during the lifetime of the triggered callback. It may become invalid afterwards.

See Also

DebugUtilsMessengerCreateInfoEXT, createDebugUtilsMessengerEXT

pattern EXT_debug_utils_SPEC_VERSION :: forall a. Integral a => a Source #

type EXT_DEBUG_UTILS_EXTENSION_NAME = "XR_EXT_debug_utils" Source #

pattern EXT_DEBUG_UTILS_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #