ext_debug_utils

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: MIT Imports: 10 Imported by: 0

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 struct {
	// contains filtered or unexported fields
}

DebugUtilsMessenger is an implementation of the DebugUtilsMessenger interface that actually communicates with Vulkan. This is the default implementation. See the interface for more documentation.

func InternalDebugUtilsMessenger

func InternalDebugUtilsMessenger(instance loader.VkInstance, handle ext_driver.VkDebugUtilsMessengerEXT, apiVersion common.APIVersion) DebugUtilsMessenger

func (DebugUtilsMessenger) APIVersion

func (m DebugUtilsMessenger) APIVersion() common.APIVersion

func (DebugUtilsMessenger) Handle

func (DebugUtilsMessenger) Initialized

func (m DebugUtilsMessenger) Initialized() bool

func (DebugUtilsMessenger) InstanceHandle

func (m DebugUtilsMessenger) InstanceHandle() loader.VkInstance

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 loader.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 loader.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 ExtensionDriver

type ExtensionDriver 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(allocator *loader.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(severity DebugUtilsMessageSeverityFlags, types DebugUtilsMessageTypeFlags, data DebugUtilsMessengerCallbackData) error

	DestroyDebugUtilsMessenger(messenger DebugUtilsMessenger, callbacks *loader.AllocationCallbacks)
}

ExtensionDriver 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

func CreateExtensionDriverFromCoreDriver

func CreateExtensionDriverFromCoreDriver(coreDriver core1_0.CoreInstanceDriver) ExtensionDriver

CreateExtensionDriverFromCoreDriver produces an ExtensionDriver object from an Instance with ext_debug_utils loaded

type VulkanExtensionDriver

type VulkanExtensionDriver struct {
	// contains filtered or unexported fields
}

VulkanExtensionDriver is an implementation of the ExtensionDriver interface that actually communicates with Vulkan. This is the default implementation. See the interface for more documentation.

func CreateDriverFromLoader

func CreateDriverFromLoader(loader ext_driver.Loader, coreLoader loader.Loader, instance core1_0.Instance) *VulkanExtensionDriver

CreateDriverFromLoader generates an ExtensionDriver from a loader.Loader object- this is usually used in tests to build an ExtensionDriver from mock drivers

func (*VulkanExtensionDriver) CmdBeginDebugUtilsLabel

func (l *VulkanExtensionDriver) CmdBeginDebugUtilsLabel(commandBuffer core1_0.CommandBuffer, label DebugUtilsLabel) error

func (*VulkanExtensionDriver) CmdEndDebugUtilsLabel

func (l *VulkanExtensionDriver) CmdEndDebugUtilsLabel(buffer core1_0.CommandBuffer)

func (*VulkanExtensionDriver) CmdInsertDebugUtilsLabel

func (l *VulkanExtensionDriver) CmdInsertDebugUtilsLabel(buffer core1_0.CommandBuffer, label DebugUtilsLabel) error

func (*VulkanExtensionDriver) CreateDebugUtilsMessenger

func (*VulkanExtensionDriver) DestroyDebugUtilsMessenger

func (l *VulkanExtensionDriver) DestroyDebugUtilsMessenger(messenger DebugUtilsMessenger, callbacks *loader.AllocationCallbacks)

func (*VulkanExtensionDriver) QueueBeginDebugUtilsLabel

func (l *VulkanExtensionDriver) QueueBeginDebugUtilsLabel(queue core1_0.Queue, label DebugUtilsLabel) error

func (*VulkanExtensionDriver) QueueEndDebugUtilsLabel

func (l *VulkanExtensionDriver) QueueEndDebugUtilsLabel(queue core1_0.Queue)

func (*VulkanExtensionDriver) QueueInsertDebugUtilsLabel

func (l *VulkanExtensionDriver) QueueInsertDebugUtilsLabel(queue core1_0.Queue, label DebugUtilsLabel) error

func (*VulkanExtensionDriver) SetDebugUtilsObjectName

func (l *VulkanExtensionDriver) SetDebugUtilsObjectName(device core1_0.Device, name DebugUtilsObjectNameInfo) (common.VkResult, error)

func (*VulkanExtensionDriver) SetDebugUtilsObjectTag

func (l *VulkanExtensionDriver) SetDebugUtilsObjectTag(device core1_0.Device, tag DebugUtilsObjectTagInfo) (common.VkResult, error)

func (*VulkanExtensionDriver) 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