Documentation
¶
Index ¶
- Constants
- type BufferDeviceAddressInfo
- type BufferOpaqueCaptureAddressCreateInfo
- type DeviceMemoryOpaqueCaptureAddressInfo
- type ExtensionDriver
- type MemoryOpaqueCaptureAddressAllocateInfo
- type PhysicalDeviceBufferDeviceAddressFeatures
- func (o PhysicalDeviceBufferDeviceAddressFeatures) PopulateCPointer(allocator *cgoparam.Allocator, preallocatedPointer unsafe.Pointer, ...) (unsafe.Pointer, error)
- func (o *PhysicalDeviceBufferDeviceAddressFeatures) PopulateHeader(allocator *cgoparam.Allocator, preallocatedPointer unsafe.Pointer, ...) (unsafe.Pointer, error)
- func (o *PhysicalDeviceBufferDeviceAddressFeatures) PopulateOutData(cDataPointer unsafe.Pointer, helpers ...any) (next unsafe.Pointer, err error)
- type VulkanExtensionDriver
- func (e *VulkanExtensionDriver) GetBufferDeviceAddress(o BufferDeviceAddressInfo) (uint64, error)
- func (e *VulkanExtensionDriver) GetBufferOpaqueCaptureAddress(o BufferDeviceAddressInfo) (uint64, error)
- func (e *VulkanExtensionDriver) GetDeviceMemoryOpaqueCaptureAddress(o DeviceMemoryOpaqueCaptureAddressInfo) (uint64, error)
Constants ¶
const ( // ExtensionName is "VK_KHR_buffer_device_address" // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_buffer_device_address.html ExtensionName string = C.VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME // BufferCreateDeviceAddressCaptureReplay specifies that the Buffer object's address can // be saved and reused on a subsequent run (e.g. for trace capture and replay) // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkBufferCreateFlagBits.html BufferCreateDeviceAddressCaptureReplay core1_0.BufferCreateFlags = C.VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR // BufferUsageShaderDeviceAddress specifies that the Buffer can be used to retrieve a // Buffer device address via Device.GetBufferDeviceAddress and use that address to // access the Buffer object's memory from a shader // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkBufferUsageFlagBits.html BufferUsageShaderDeviceAddress core1_0.BufferUsageFlags = C.VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR // MemoryAllocateDeviceAddress specifies that the memory can be attached to a Buffer object // created with BufferUsageShaderDeviceAddress set in Usage, and that the DeviceMemory object // can be used to retrieve an opaque address via Device.GetDeviceMemoryOpaqueCaptureAddress // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkMemoryAllocateFlagBits.html MemoryAllocateDeviceAddress core1_1.MemoryAllocateFlags = C.VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR // MemoryAllocateDeviceAddressCaptureReplay specifies that the memory's address can be saved // and reused on a subsequent run (e.g. for trace capture and replay) // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkMemoryAllocateFlagBits.html MemoryAllocateDeviceAddressCaptureReplay core1_1.MemoryAllocateFlags = C.VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR // VkErrorInvalidOpaqueCaptureAddress indicates a Buffer creation or memory allocation failed // because the requested address is not available // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkResult.html VkErrorInvalidOpaqueCaptureAddress common.VkResult = C.VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferDeviceAddressInfo ¶
type BufferDeviceAddressInfo = core1_2.BufferDeviceAddressInfo
BufferDeviceAddressInfo specifies the Buffer to query an address for
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkBufferDeviceAddressInfo.html
type BufferOpaqueCaptureAddressCreateInfo ¶
type BufferOpaqueCaptureAddressCreateInfo struct {
// OpaqueCaptureAddress is the opaque capture address requested for the Buffer
OpaqueCaptureAddress uint64
common.NextOptions
}
BufferOpaqueCaptureAddressCreateInfo requests a specific address for a Buffer
type DeviceMemoryOpaqueCaptureAddressInfo ¶
type DeviceMemoryOpaqueCaptureAddressInfo = core1_2.DeviceMemoryOpaqueCaptureAddressInfo
DeviceMemoryOpaqueCaptureAddressInfo specifies the DeviceMemory object to query an address for
type ExtensionDriver ¶
type ExtensionDriver interface {
// GetBufferDeviceAddress queries an address of a Buffer
//
// device - The Device that owns the Buffer
//
// o - Specifies the Buffer to retrieve an address for
//
// https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkGetBufferDeviceAddress.html
GetBufferDeviceAddress(o BufferDeviceAddressInfo) (uint64, error)
// GetBufferOpaqueCaptureAddress queries an opaque capture address of a Buffer
//
// device - The Device that owns the Buffer
//
// o - Specifies the Buffer to retrieve an address for
//
// https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkGetBufferOpaqueCaptureAddress.html
GetBufferOpaqueCaptureAddress(o BufferDeviceAddressInfo) (uint64, error)
// GetDeviceMemoryOpaqueCaptureAddress queries an opaque capture address of a DeviceMemory object
//
// device - The Device that owns the DeviceMemory
//
// o - Specifies the DeviceMemory object to retrieve an address for
//
// https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkGetDeviceMemoryOpaqueCaptureAddress.html
GetDeviceMemoryOpaqueCaptureAddress(o DeviceMemoryOpaqueCaptureAddressInfo) (uint64, error)
}
ExtensionDriver contains all the commands for the khr_buffer_device_address extension
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_buffer_device_address.html
func CreateExtensionDriverFromCoreDriver ¶
func CreateExtensionDriverFromCoreDriver(coreDriver core1_0.DeviceDriver) ExtensionDriver
CreateExtensionDriverFromCoreDriver produces an ExtensionDriver object from a Device with khr_buffer_device_address loaded
type MemoryOpaqueCaptureAddressAllocateInfo ¶
type MemoryOpaqueCaptureAddressAllocateInfo struct {
// OpaqueCaptureAddress is the opaque capture address requested for the memory allocation
OpaqueCaptureAddress uint64
common.NextOptions
}
MemoryOpaqueCaptureAddressAllocateInfo requests a specific address for a memory allocation
type PhysicalDeviceBufferDeviceAddressFeatures ¶
type PhysicalDeviceBufferDeviceAddressFeatures struct {
// BufferDeviceAddress indicates that the implementation supports accessing Buffer memory
// in shaders as storage Buffer objects via an address queried from Device.GetBufferDeviceAddress
BufferDeviceAddress bool
// BufferDeviceAddressCaptureReplay indicates that the implementation supports saving and
// reusing Buffer and Device addresses, e.g. for trace capture and replay
BufferDeviceAddressCaptureReplay bool
// BufferDeviceAddressMultiDevice indicates that the implementation supports the
// BufferDeviceAddress, RayTracingPipeline, and RayQuery features for logical Device objects
// created with multiple PhysicalDevice objects
BufferDeviceAddressMultiDevice bool
common.NextOptions
common.NextOutData
}
PhysicalDeviceBufferDeviceAddressFeatures describes Buffer address features that can be supported by an implementation
func (PhysicalDeviceBufferDeviceAddressFeatures) PopulateCPointer ¶
func (*PhysicalDeviceBufferDeviceAddressFeatures) PopulateHeader ¶
func (*PhysicalDeviceBufferDeviceAddressFeatures) PopulateOutData ¶
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 CreateExtensionDriverFromLoader ¶
func CreateExtensionDriverFromLoader(driver khr_buffer_device_address_loader.Loader, device core1_0.Device) *VulkanExtensionDriver
CreateExtensionDriverFromLoader generates an ExtensionDriver from a loader.Loader object- this is usually used in tests to build an ExtensionDriver from mock drivers
func (*VulkanExtensionDriver) GetBufferDeviceAddress ¶
func (e *VulkanExtensionDriver) GetBufferDeviceAddress(o BufferDeviceAddressInfo) (uint64, error)
func (*VulkanExtensionDriver) GetBufferOpaqueCaptureAddress ¶
func (e *VulkanExtensionDriver) GetBufferOpaqueCaptureAddress(o BufferDeviceAddressInfo) (uint64, error)
func (*VulkanExtensionDriver) GetDeviceMemoryOpaqueCaptureAddress ¶
func (e *VulkanExtensionDriver) GetDeviceMemoryOpaqueCaptureAddress(o DeviceMemoryOpaqueCaptureAddressInfo) (uint64, error)