Documentation
¶
Index ¶
- Constants
- type CallbackFunction
- type DebugUtilsLabel
- type DebugUtilsMessageSeverityFlags
- type DebugUtilsMessageTypeFlags
- type DebugUtilsMessenger
- type DebugUtilsMessengerCallbackData
- type DebugUtilsMessengerCreateFlags
- type DebugUtilsMessengerCreateInfo
- type DebugUtilsObjectNameInfo
- type DebugUtilsObjectTagInfo
- type Extension
- type VulkanDebugUtilsMessenger
- type VulkanExtension
- func (l *VulkanExtension) CmdBeginDebugUtilsLabel(commandBuffer core1_0.CommandBuffer, label DebugUtilsLabel) error
- func (l *VulkanExtension) CmdEndDebugUtilsLabel(buffer core1_0.CommandBuffer)
- func (l *VulkanExtension) CmdInsertDebugUtilsLabel(buffer core1_0.CommandBuffer, label DebugUtilsLabel) error
- func (l *VulkanExtension) CreateDebugUtilsMessenger(instance core1_0.Instance, allocation *driver.AllocationCallbacks, ...) (DebugUtilsMessenger, common.VkResult, error)
- func (l *VulkanExtension) QueueBeginDebugUtilsLabel(queue core1_0.Queue, label DebugUtilsLabel) error
- func (l *VulkanExtension) QueueEndDebugUtilsLabel(queue core1_0.Queue)
- func (l *VulkanExtension) QueueInsertDebugUtilsLabel(queue core1_0.Queue, label DebugUtilsLabel) error
- func (l *VulkanExtension) SetDebugUtilsObjectName(device core1_0.Device, name DebugUtilsObjectNameInfo) (common.VkResult, error)
- func (l *VulkanExtension) SetDebugUtilsObjectTag(device core1_0.Device, tag DebugUtilsObjectTagInfo) (common.VkResult, error)
- func (l *VulkanExtension) SubmitDebugUtilsMessage(instance core1_0.Instance, severity DebugUtilsMessageSeverityFlags, ...) error
Constants ¶
const ( // ExtensionName is "VK_EXT_debug_utils" // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_debug_utils.html ExtensionName string = C.VK_EXT_DEBUG_UTILS_EXTENSION_NAME // TypeGeneral specifies that some general event has occurred // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsMessageTypeFlagBitsEXT.html TypeGeneral DebugUtilsMessageTypeFlags = C.VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT // TypeValidation specifies that something has occurred during validation against // the Vulkan specification that may indicate invalid behavior // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsMessageTypeFlagBitsEXT.html TypeValidation DebugUtilsMessageTypeFlags = C.VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT // TypePerformance specifies a potentially non-optimal use of Vulkan, e.g. using // CommandBuffer.CmdClearColorImage when setting AttachmentDescription.LoadOp to // AttachmentLoadOpClear would have worked // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsMessageTypeFlagBitsEXT.html TypePerformance DebugUtilsMessageTypeFlags = C.VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT // SeverityVerbose specifies the most verbose output indicating all diagnostic messages // from the Vulkan loader, layers, and drivers should be captured // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsMessageSeverityFlagBitsEXT.html SeverityVerbose DebugUtilsMessageSeverityFlags = C.VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT // SeverityInfo specifies an informational message such as resource details that may be // handy when debugging an application // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsMessageSeverityFlagBitsEXT.html SeverityInfo DebugUtilsMessageSeverityFlags = C.VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT // SeverityWarning specifies use of Vulkan that may expose an app bug // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsMessageSeverityFlagBitsEXT.html SeverityWarning DebugUtilsMessageSeverityFlags = C.VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT // SeverityError specifies that the application has violated a valid usage condition // of the specification // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsMessageSeverityFlagBitsEXT.html SeverityError DebugUtilsMessageSeverityFlags = C.VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT // ObjectTypeDebugUtilsMessenger specifies a DebugUtilsMessenger handle // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkObjectType.html ObjectTypeDebugUtilsMessenger core1_0.ObjectType = C.VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackFunction ¶
type CallbackFunction func(msgType DebugUtilsMessageTypeFlags, severity DebugUtilsMessageSeverityFlags, data *DebugUtilsMessengerCallbackData) bool
CallbackFunction is the application callback function type
type DebugUtilsLabel ¶
type DebugUtilsLabel struct {
// LabelName is a string containing the name of the label
LabelName string
// Color is an optional color value that can be associated with the label
Color color.Color
common.NextOptions
}
DebugUtilsLabel specifies parameters of a label region
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsLabelEXT.html
func (DebugUtilsLabel) PopulateCPointer ¶
func (*DebugUtilsLabel) PopulateFromCPointer ¶
func (l *DebugUtilsLabel) PopulateFromCPointer(cDataPointer unsafe.Pointer)
type DebugUtilsMessageSeverityFlags ¶ added in v0.2.0
type DebugUtilsMessageSeverityFlags int32
DebugUtilsMessageSeverityFlags specifies which severities of events cause a debug messenger callback
func (DebugUtilsMessageSeverityFlags) Register ¶ added in v0.2.0
func (f DebugUtilsMessageSeverityFlags) Register(str string)
func (DebugUtilsMessageSeverityFlags) String ¶ added in v0.2.0
func (f DebugUtilsMessageSeverityFlags) String() string
type DebugUtilsMessageTypeFlags ¶ added in v0.2.0
type DebugUtilsMessageTypeFlags int32
DebugUtilsMessageTypeFlags specifies which types of events cause a debug messenger callback
func (DebugUtilsMessageTypeFlags) Register ¶ added in v0.2.0
func (f DebugUtilsMessageTypeFlags) Register(str string)
func (DebugUtilsMessageTypeFlags) String ¶ added in v0.2.0
func (f DebugUtilsMessageTypeFlags) String() string
type DebugUtilsMessenger ¶ added in v0.2.0
type DebugUtilsMessenger interface {
// Handle is the internal Vulkan object handle for this DebugUtilsMessenger
Handle() ext_driver.VkDebugUtilsMessengerEXT
// Destroy destroys the DebugUtilsMessenger object and the underlying structures. **Warning** after
// destruction, this object will continue to exist, but the Vulkan object handle that backs it will
// be invalid. Do not call further methods on this object.
Destroy(callbacks *driver.AllocationCallbacks)
}
DebugUtilsMessenger is a messenger object which handles passing along debug messages to a provided debug callback
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsMessengerEXT.html
type DebugUtilsMessengerCallbackData ¶
type DebugUtilsMessengerCallbackData struct {
// Flags is reserved for future use
Flags DebugUtilsMessengerCreateFlags
// MessageIDName is a string identifying the particular message ID that is associated
// with the provided message
MessageIDName string
// MessageIDNumber is the ID number of the triggering message
MessageIDNumber int
// Message is a string detailing the trigger conditions
Message string
// QueueLabels is a slice of DebugUtilsLabel structures active in the current Queue
// at the time the callback was triggered
QueueLabels []DebugUtilsLabel
// CmdBufLabels is a slice of DebugUtilsLabel structures active in the current
// CommandBuffer at the time the callback was triggered
CmdBufLabels []DebugUtilsLabel
// Objects is a slice of DebugUtilsObjectNameInfo structures representing objects
// related to the detected issue
Objects []DebugUtilsObjectNameInfo
common.NextOptions
}
DebugUtilsMessengerCallbackData specifies parameters returned to the callback
func (DebugUtilsMessengerCallbackData) PopulateCPointer ¶
func (*DebugUtilsMessengerCallbackData) PopulateFromCPointer ¶
func (c *DebugUtilsMessengerCallbackData) PopulateFromCPointer(cPointer unsafe.Pointer) error
type DebugUtilsMessengerCreateFlags ¶ added in v0.2.0
type DebugUtilsMessengerCreateFlags int32
DebugUtilsMessengerCreateFlags is reserved for future use
func (DebugUtilsMessengerCreateFlags) Register ¶ added in v0.2.0
func (f DebugUtilsMessengerCreateFlags) Register(str string)
func (DebugUtilsMessengerCreateFlags) String ¶ added in v0.2.0
func (f DebugUtilsMessengerCreateFlags) String() string
type DebugUtilsMessengerCreateInfo ¶
type DebugUtilsMessengerCreateInfo struct {
// Flags is reserved for future use
Flags DebugUtilsMessengerCreateFlags
// MessageSeverity specifies which severity of event(s) will cause this callback
// to be called
MessageSeverity DebugUtilsMessageSeverityFlags
// MessageType specifies which type of event(s) will cause this callback to be called
MessageType DebugUtilsMessageTypeFlags
// UserCallback is the application callback function to call
UserCallback CallbackFunction
common.NextOptions
}
DebugUtilsMessengerCreateInfo specifies parameters of a newly-created DebugUtilsMessenger
type DebugUtilsObjectNameInfo ¶
type DebugUtilsObjectNameInfo struct {
// ObjectName is a string specifying the name to apply to ObjectHandle
ObjectName string
// ObjectHandle is the handle of the object to be named
ObjectHandle driver.VulkanHandle
// ObjectType specifies the type of the object to be named
ObjectType core1_0.ObjectType
common.NextOptions
}
DebugUtilsObjectNameInfo specifies parameters of a name to give to an object
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsObjectNameInfoEXT.html
func (DebugUtilsObjectNameInfo) PopulateCPointer ¶
func (*DebugUtilsObjectNameInfo) PopulateFromCPointer ¶
func (i *DebugUtilsObjectNameInfo) PopulateFromCPointer(cDataPointer unsafe.Pointer)
type DebugUtilsObjectTagInfo ¶
type DebugUtilsObjectTagInfo struct {
// ObjectType specifies the type of the object to be named
ObjectType core1_0.ObjectType
// ObjectHandle is the object to be tagged
ObjectHandle driver.VulkanHandle
// TagName is a numerical identifier of the tag
TagName uint64
// Tag is a slice of bytes containing the data to be associated with the object
Tag []byte
common.NextOptions
}
DebugUtilsObjectTagInfo specifies parameters of a tag to attach to an object
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsObjectTagInfoEXT.html
func (DebugUtilsObjectTagInfo) PopulateCPointer ¶
func (*DebugUtilsObjectTagInfo) PopulateFromCPointer ¶
func (t *DebugUtilsObjectTagInfo) PopulateFromCPointer(cPointer unsafe.Pointer)
type Extension ¶
type Extension interface {
// CreateDebugUtilsMessenger creates a debug messenger object
//
// instance - the instance the messenger will be used with
//
// allocator - controls host memory allocation
//
// o - contains the callback, as well as defining conditions under which this messenger will
// trigger the callback
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateDebugUtilsMessengerEXT.html
CreateDebugUtilsMessenger(instance core1_0.Instance, allocator *driver.AllocationCallbacks, o DebugUtilsMessengerCreateInfo) (DebugUtilsMessenger, common.VkResult, error)
// CmdBeginDebugUtilsLabel opens a CommandBuffer debug label region
//
// commandBuffer - the CommandBuffer into which the command is recorded
//
// label - specifies parameters of the label region to open
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginDebugUtilsLabelEXT.html
CmdBeginDebugUtilsLabel(commandBuffer core1_0.CommandBuffer, label DebugUtilsLabel) error
// CmdEndDebugUtilsLabel closes a CommandBuffer label region
//
// commandBuffer - the CommandBuffer into which the command is recorded
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndDebugUtilsLabelEXT.html
CmdEndDebugUtilsLabel(commandBuffer core1_0.CommandBuffer)
// CmdInsertDebugUtilsLabel inserts a label into a CommandBuffer
//
// commandBuffer - the CommandBuffer into which the command is recorded
//
// label - specifies parameters of the label to insert
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdInsertDebugUtilsLabelEXT.html
CmdInsertDebugUtilsLabel(commandBuffer core1_0.CommandBuffer, label DebugUtilsLabel) error
// QueueBeginDebugUtilsLabel opens a Queue debug label region
//
// queue - The Queue in which to start a debug label region
//
// label - Specifies parameters of the label region to open
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueueBeginDebugUtilsLabelEXT.html
QueueBeginDebugUtilsLabel(queue core1_0.Queue, label DebugUtilsLabel) error
// QueueEndDebugUtilsLabel closes a Queue debug label region
//
// queue - The Queue in which a debug label region should be closed
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueueEndDebugUtilsLabelEXT.html
QueueEndDebugUtilsLabel(queue core1_0.Queue)
// QueueInsertDebugUtilsLabel inserts a label into a Queue
//
// queue - The Queue into which a debug label will be inserted
//
// label - Specifies parameters of the label to insert
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueueInsertDebugUtilsLabelEXT.html
QueueInsertDebugUtilsLabel(queue core1_0.Queue, label DebugUtilsLabel) error
// SetDebugUtilsObjectName gives a user-friendly name to an object
//
// device - The Device that created the object
//
// name - Specifies parameters of the name to set on the object
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSetDebugUtilsObjectNameEXT.html
SetDebugUtilsObjectName(device core1_0.Device, name DebugUtilsObjectNameInfo) (common.VkResult, error)
// SetDebugUtilsObjectTag attaches arbitrary data to an object
//
// device - The Device that created the object
//
// tag - Specifies parameters of the tag to attach to the object
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSetDebugUtilsObjectTagEXT.html
SetDebugUtilsObjectTag(device core1_0.Device, tag DebugUtilsObjectTagInfo) (common.VkResult, error)
// SubmitDebugUtilsMessage injects a message into a debug stream
//
// instance - The debug stream's Instance
//
// severity - Specifies the severity of this event/message
//
// types - Specifies which type of event(s) to identify with this message
//
// data - All the callback-related data
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSubmitDebugUtilsMessageEXT.html
SubmitDebugUtilsMessage(instance core1_0.Instance, severity DebugUtilsMessageSeverityFlags, types DebugUtilsMessageTypeFlags, data DebugUtilsMessengerCallbackData) error
}
Extension contains all the commands for the ext_debug_utils extension
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_debug_utils.html
type VulkanDebugUtilsMessenger ¶ added in v0.2.0
type VulkanDebugUtilsMessenger struct {
// contains filtered or unexported fields
}
VulkanDebugUtilsMessenger is an implementation of the DebugUtilsMessenger interface that actually communicates with Vulkan. This is the default implementation. See the interface for more documentation.
func (*VulkanDebugUtilsMessenger) Destroy ¶ added in v0.2.0
func (m *VulkanDebugUtilsMessenger) Destroy(callbacks *driver.AllocationCallbacks)
func (*VulkanDebugUtilsMessenger) Handle ¶ added in v0.2.0
func (m *VulkanDebugUtilsMessenger) Handle() ext_driver.VkDebugUtilsMessengerEXT
type VulkanExtension ¶
type VulkanExtension struct {
// contains filtered or unexported fields
}
VulkanExtension is an implementation of the Extension interface that actually communicates with Vulkan. This is the default implementation. See the interface for more documentation.
func CreateExtensionFromDriver ¶
func CreateExtensionFromDriver(driver ext_driver.Driver) *VulkanExtension
CreateExtensionFromDriver generates an Extension from a driver.Driver object- this is usually used in tests to build an Extension from mock drivers
func CreateExtensionFromInstance ¶
func CreateExtensionFromInstance(instance core1_0.Instance) *VulkanExtension
CreateExtensionFromInstance produces an Extension object from an Instance with ext_debug_utils loaded
func (*VulkanExtension) CmdBeginDebugUtilsLabel ¶
func (l *VulkanExtension) CmdBeginDebugUtilsLabel(commandBuffer core1_0.CommandBuffer, label DebugUtilsLabel) error
func (*VulkanExtension) CmdEndDebugUtilsLabel ¶
func (l *VulkanExtension) CmdEndDebugUtilsLabel(buffer core1_0.CommandBuffer)
func (*VulkanExtension) CmdInsertDebugUtilsLabel ¶
func (l *VulkanExtension) CmdInsertDebugUtilsLabel(buffer core1_0.CommandBuffer, label DebugUtilsLabel) error
func (*VulkanExtension) CreateDebugUtilsMessenger ¶
func (l *VulkanExtension) CreateDebugUtilsMessenger(instance core1_0.Instance, allocation *driver.AllocationCallbacks, o DebugUtilsMessengerCreateInfo) (DebugUtilsMessenger, common.VkResult, error)
func (*VulkanExtension) QueueBeginDebugUtilsLabel ¶
func (l *VulkanExtension) QueueBeginDebugUtilsLabel(queue core1_0.Queue, label DebugUtilsLabel) error
func (*VulkanExtension) QueueEndDebugUtilsLabel ¶
func (l *VulkanExtension) QueueEndDebugUtilsLabel(queue core1_0.Queue)
func (*VulkanExtension) QueueInsertDebugUtilsLabel ¶
func (l *VulkanExtension) QueueInsertDebugUtilsLabel(queue core1_0.Queue, label DebugUtilsLabel) error
func (*VulkanExtension) SetDebugUtilsObjectName ¶
func (l *VulkanExtension) SetDebugUtilsObjectName(device core1_0.Device, name DebugUtilsObjectNameInfo) (common.VkResult, error)
func (*VulkanExtension) SetDebugUtilsObjectTag ¶
func (l *VulkanExtension) SetDebugUtilsObjectTag(device core1_0.Device, tag DebugUtilsObjectTagInfo) (common.VkResult, error)
func (*VulkanExtension) SubmitDebugUtilsMessage ¶
func (l *VulkanExtension) SubmitDebugUtilsMessage(instance core1_0.Instance, severity DebugUtilsMessageSeverityFlags, types DebugUtilsMessageTypeFlags, data DebugUtilsMessengerCallbackData) error