khr_timeline_semaphore

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ExtensionName is "VK_KHR_timeline_semaphore"
	//
	// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_timeline_semaphore.html
	ExtensionName string = C.VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME

	// SemaphoreTypeBinary specifies a binary Semaphore type that has a boolean payload
	// indicating whether the Semaphore is currently signaled or unsignaled
	//
	// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkSemaphoreType.html
	SemaphoreTypeBinary SemaphoreType = C.VK_SEMAPHORE_TYPE_BINARY_KHR
	// SemaphoreTypeTimeline specifies a timeline Semaphore type that has a strictly
	// increasing 64-bit unsigned integer payload indicating whether the Semaphore is signaled
	// with respect to a particular reference value
	//
	// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkSemaphoreType.html
	SemaphoreTypeTimeline SemaphoreType = C.VK_SEMAPHORE_TYPE_TIMELINE_KHR

	// SemaphoreWaitAny specifies that the Semaphore wait condition is that at least one of
	// the Semaphore objects in SemaphoreWaitInfo.Semaphores has reached the value specified
	// by the corresponding element of SemaphoreWaitInfo.Values
	//
	// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkSemaphoreWaitFlagBits.html
	SemaphoreWaitAny SemaphoreWaitFlags = C.VK_SEMAPHORE_WAIT_ANY_BIT_KHR
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Extension

type Extension interface {
	// SemaphoreCounterValue queries the current state of a timeline Semaphore
	//
	// semaphore - The Semaphore to query
	//
	// https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkGetSemaphoreCounterValue.html
	SemaphoreCounterValue(semaphore core1_0.Semaphore) (uint64, common.VkResult, error)
	// SignalSemaphore signals a timeline Semaphore on the host
	//
	// device - The Device which owns the Semaphore being signaled
	//
	// o - Contains information about the signal operation
	//
	// https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkSignalSemaphore.html
	SignalSemaphore(device core1_0.Device, o SemaphoreSignalInfo) (common.VkResult, error)
	// WaitSemaphores waits for timeline Semaphore objects on the host
	//
	// device - The Device which owns the Semaphore objects being waited on
	//
	// timeout - How long to wait before returning VKTimeout. May be common.NoTimeout to wait indefinitely.
	// The timeout is adjusted to the closest value allowed by the implementation timeout accuracy,
	// which may be substantially longer than the requested timeout.
	//
	// o - Contains information about the wait condition
	//
	// https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkWaitSemaphores.html
	WaitSemaphores(device core1_0.Device, timeout time.Duration, o SemaphoreWaitInfo) (common.VkResult, error)
}

Extension contains all commands for the khr_timeline_semaphore extension

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

type PhysicalDeviceTimelineSemaphoreFeatures

type PhysicalDeviceTimelineSemaphoreFeatures struct {
	// TimelineSemaphore indicates whether Semaphore objects created with a SemaphoreType
	// of SemaphoreTypeTimeline are supported
	TimelineSemaphore bool

	common.NextOptions
	common.NextOutData
}

PhysicalDeviceTimelineSemaphoreFeatures describes timeline Semaphore features that can be supported by an implementation

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

func (PhysicalDeviceTimelineSemaphoreFeatures) PopulateCPointer

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

func (*PhysicalDeviceTimelineSemaphoreFeatures) PopulateHeader

func (o *PhysicalDeviceTimelineSemaphoreFeatures) PopulateHeader(allocator *cgoparam.Allocator, preallocatedPointer unsafe.Pointer, next unsafe.Pointer) (unsafe.Pointer, error)

func (*PhysicalDeviceTimelineSemaphoreFeatures) PopulateOutData

func (o *PhysicalDeviceTimelineSemaphoreFeatures) PopulateOutData(cDataPointer unsafe.Pointer, helpers ...any) (next unsafe.Pointer, err error)

type PhysicalDeviceTimelineSemaphoreProperties

type PhysicalDeviceTimelineSemaphoreProperties struct {
	// MaxTimelineSemaphoreValueDifference indicates the maximum difference allowed by the
	// implementation between the current value of a timeline Semaphore and any pending signal or
	// wait operations
	MaxTimelineSemaphoreValueDifference uint64

	common.NextOutData
}

PhysicalDeviceTimelineSemaphoreProperties describes timeline Semaphore properties that can be supported by an implementation

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

func (*PhysicalDeviceTimelineSemaphoreProperties) PopulateHeader

func (o *PhysicalDeviceTimelineSemaphoreProperties) PopulateHeader(allocator *cgoparam.Allocator, preallocatedPointer unsafe.Pointer, next unsafe.Pointer) (unsafe.Pointer, error)

func (*PhysicalDeviceTimelineSemaphoreProperties) PopulateOutData

func (o *PhysicalDeviceTimelineSemaphoreProperties) PopulateOutData(cDataPointer unsafe.Pointer, helpers ...any) (next unsafe.Pointer, err error)

type SemaphoreSignalInfo

type SemaphoreSignalInfo struct {
	// Semaphore is the Semaphore object to signal
	Semaphore core1_0.Semaphore
	// Value is the value to signal
	Value uint64

	common.NextOptions
}

SemaphoreSignalInfo contains information about a Semaphore signal operation

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

func (SemaphoreSignalInfo) PopulateCPointer

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

type SemaphoreType

type SemaphoreType int32

SemaphoreType specifies the type of a Semaphore object

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

func (SemaphoreType) Register

func (e SemaphoreType) Register(str string)

func (SemaphoreType) String

func (e SemaphoreType) String() string

type SemaphoreTypeCreateInfo

type SemaphoreTypeCreateInfo struct {
	// SemaphoreType specifies the type of the Semaphore
	SemaphoreType SemaphoreType
	// InitialValue is the initial payload value if SemaphoreType is SemaphoreTypeTimeline
	InitialValue uint64

	common.NextOptions
}

SemaphoreTypeCreateInfo specifies the type of a newly-created Semaphore

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

func (SemaphoreTypeCreateInfo) PopulateCPointer

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

type SemaphoreWaitFlags

type SemaphoreWaitFlags int32

SemaphoreWaitFlags specifies additional parameters of a Semaphore wait operation

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

func (SemaphoreWaitFlags) Register

func (f SemaphoreWaitFlags) Register(str string)

func (SemaphoreWaitFlags) String

func (f SemaphoreWaitFlags) String() string

type SemaphoreWaitInfo

type SemaphoreWaitInfo struct {
	// Flags specifies additional parameters for the Semaphore wait operation
	Flags SemaphoreWaitFlags
	// Semaphores is a slice of Semaphore objects to wait on
	Semaphores []core1_0.Semaphore
	// Values is a slice of timeline Semaphore values
	Values []uint64

	common.NextOptions
}

SemaphoreWaitInfo contains information about the Semaphore wait condition

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

func (SemaphoreWaitInfo) PopulateCPointer

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

type TimelineSemaphoreSubmitInfo

type TimelineSemaphoreSubmitInfo struct {
	// WaitSemaphoreValues is a slice of values for the corresponding Semaphore objects in
	// SubmitInfo.WaitSemaphores to wait for
	WaitSemaphoreValues []uint64
	// SignalSemaphoreValues is a slice of values for the corresponding Semaphore objects in
	// SubmitInfo.SignalSemaphores to set when signaled
	SignalSemaphoreValues []uint64

	common.NextOptions
}

TimelineSemaphoreSubmitInfo specifies signal and wait values for timeline Semaphore objects

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

func (TimelineSemaphoreSubmitInfo) PopulateCPointer

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

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 CreateExtensionFromDevice

func CreateExtensionFromDevice(device core1_0.Device) *VulkanExtension

CreateExtensionFromDevice produces an Extension object from a Device with khr_timeline_semaphore loaded

func CreateExtensionFromDriver

func CreateExtensionFromDriver(driver khr_timeline_semaphore_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 (*VulkanExtension) SemaphoreCounterValue

func (e *VulkanExtension) SemaphoreCounterValue(semaphore core1_0.Semaphore) (uint64, common.VkResult, error)

func (*VulkanExtension) SignalSemaphore

func (e *VulkanExtension) SignalSemaphore(device core1_0.Device, o SemaphoreSignalInfo) (common.VkResult, error)

func (*VulkanExtension) WaitSemaphores

func (e *VulkanExtension) WaitSemaphores(device core1_0.Device, timeout time.Duration, o SemaphoreWaitInfo) (common.VkResult, error)

Directories

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

Jump to

Keyboard shortcuts

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