ext_debug_utils

package
v2.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 10 Imported by: 43

Documentation

Index

Constants

View Source
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

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 (l DebugUtilsLabel) PopulateCPointer(allocator *cgoparam.Allocator, preallocatedPointer unsafe.Pointer, next unsafe.Pointer) (unsafe.Pointer, error)

func (*DebugUtilsLabel) PopulateFromCPointer

func (l *DebugUtilsLabel) PopulateFromCPointer(cDataPointer unsafe.Pointer)

type DebugUtilsMessageSeverityFlags

type DebugUtilsMessageSeverityFlags int32

DebugUtilsMessageSeverityFlags specifies which severities of events cause a debug messenger callback

https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsMessageSeverityFlagBitsEXT.html

func (DebugUtilsMessageSeverityFlags) Register

func (f DebugUtilsMessageSeverityFlags) Register(str string)

func (DebugUtilsMessageSeverityFlags) String

type DebugUtilsMessageTypeFlags

type DebugUtilsMessageTypeFlags int32

DebugUtilsMessageTypeFlags specifies which types of events cause a debug messenger callback

https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsMessageTypeFlagBitsEXT.html

func (DebugUtilsMessageTypeFlags) Register

func (f DebugUtilsMessageTypeFlags) Register(str string)

func (DebugUtilsMessageTypeFlags) String

type DebugUtilsMessenger

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

https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsMessengerCallbackDataEXT.html

func (DebugUtilsMessengerCallbackData) PopulateCPointer

func (c DebugUtilsMessengerCallbackData) PopulateCPointer(allocator *cgoparam.Allocator, preallocatedPointer unsafe.Pointer, next unsafe.Pointer) (unsafe.Pointer, error)

func (*DebugUtilsMessengerCallbackData) PopulateFromCPointer

func (c *DebugUtilsMessengerCallbackData) PopulateFromCPointer(cPointer unsafe.Pointer) error

type DebugUtilsMessengerCreateFlags

type DebugUtilsMessengerCreateFlags int32

DebugUtilsMessengerCreateFlags is reserved for future use

https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsMessengerCreateFlagsEXT.html

func (DebugUtilsMessengerCreateFlags) Register

func (f DebugUtilsMessengerCreateFlags) Register(str string)

func (DebugUtilsMessengerCreateFlags) 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

https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsMessengerCreateInfoEXT.html

func (DebugUtilsMessengerCreateInfo) PopulateCPointer

func (o DebugUtilsMessengerCreateInfo) PopulateCPointer(allocator *cgoparam.Allocator, preallocatedPointer unsafe.Pointer, next unsafe.Pointer) (unsafe.Pointer, error)

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 (i DebugUtilsObjectNameInfo) PopulateCPointer(allocator *cgoparam.Allocator, preallocatedPointer unsafe.Pointer, next unsafe.Pointer) (unsafe.Pointer, error)

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 (t DebugUtilsObjectTagInfo) PopulateCPointer(allocator *cgoparam.Allocator, preallocatedPointer unsafe.Pointer, next unsafe.Pointer) (unsafe.Pointer, error)

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

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

func (m *VulkanDebugUtilsMessenger) Destroy(callbacks *driver.AllocationCallbacks)

func (*VulkanDebugUtilsMessenger) Handle

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 (*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

Directories

Path Synopsis
Package mock_debugutils is a generated GoMock package.
Package mock_debugutils is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL