khr_external_memory_capabilities

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: 8 Imported by: 1

Documentation

Index

Constants

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

	// LUIDSize is the length of a locally unique Device identifier
	//
	// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_LUID_SIZE.html
	LUIDSize int = C.VK_LUID_SIZE_KHR

	// ExternalMemoryFeatureDedicatedOnly specifies that Image or Buffer objects created with the
	// specified parameters and handle type must create or import a dedicated allocation for
	// the Image or Buffer object
	//
	// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkExternalMemoryFeatureFlagBits.html
	ExternalMemoryFeatureDedicatedOnly ExternalMemoryFeatureFlags = C.VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR
	// ExternalMemoryFeatureExportable specifies that handles of this type can be exported from
	// Vulkan memory objects
	//
	// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkExternalMemoryFeatureFlagBits.html
	ExternalMemoryFeatureExportable ExternalMemoryFeatureFlags = C.VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR
	// ExternalMemoryFeatureImportable specifies that handles of this type can be imported as Vulkan
	// memory objects
	//
	// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkExternalMemoryFeatureFlagBits.html
	ExternalMemoryFeatureImportable ExternalMemoryFeatureFlags = C.VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR

	// ExternalMemoryHandleTypeD3D11Texture specifies an NT handle returned by
	// IDXGIResource1::CreateSharedHandle referring to a Direct3D 10 or 11 texture resource
	//
	// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkExternalMemoryHandleTypeFlagBits.html
	ExternalMemoryHandleTypeD3D11Texture ExternalMemoryHandleTypeFlags = C.VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR
	// ExternalMemoryHandleTypeD3D11TextureKMT specifies a global share handle returned by
	// IDXGIResource::GetSharedHandle referring to a Direct3D 10 or 11 texture resource
	//
	// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkExternalMemoryHandleTypeFlagBits.html
	ExternalMemoryHandleTypeD3D11TextureKMT ExternalMemoryHandleTypeFlags = C.VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR
	// ExternalMemoryHandleTypeD3D12Heap specifies an NT handle returned by
	// ID3D12Device::CreateSharedHandle referring to a Direct3D 12 heap resource
	//
	// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkExternalMemoryHandleTypeFlagBits.html
	ExternalMemoryHandleTypeD3D12Heap ExternalMemoryHandleTypeFlags = C.VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR
	// ExternalMemoryHandleTypeD3D12Resource specifies an NT handle returned by
	// ID3D12Device::CreateSharedHandle referring to a Direct3D 12 committed resource
	//
	// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkExternalMemoryHandleTypeFlagBits.html
	ExternalMemoryHandleTypeD3D12Resource ExternalMemoryHandleTypeFlags = C.VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR
	// ExternalMemoryHandleTypeOpaqueFD specifies a POSIX file descriptor handle that has only limited
	// valid usage outside of Vulkan and other compatible APIs
	//
	// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkExternalMemoryHandleTypeFlagBits.html
	ExternalMemoryHandleTypeOpaqueFD ExternalMemoryHandleTypeFlags = C.VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR
	// ExternalMemoryHandleTypeOpaqueWin32 specifies an NT handle that has only limited valid usage
	// outside of Vulkan and other compatible APIs
	//
	// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkExternalMemoryHandleTypeFlagBits.html
	ExternalMemoryHandleTypeOpaqueWin32 ExternalMemoryHandleTypeFlags = C.VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR
	// ExternalMemoryHandleTypeOpaqueWin32KMT specifies a global share handle that has only
	// limited valid usage outside of Vulkan and other compatible APIs
	//
	// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkExternalMemoryHandleTypeFlagBits.html
	ExternalMemoryHandleTypeOpaqueWin32KMT ExternalMemoryHandleTypeFlags = C.VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Extension

type Extension interface {
	// PhysicalDeviceExternalBufferProperties queries external types supported by Buffer objects
	//
	// physicalDevice - The PhysicalDevice being queried
	//
	// o - Describes the parameters that would be consumed by Device.CreateBuffer
	//
	// outData - A pre-allocated object in which the results will be populated. It should include any
	// desired chained OutData objects.
	//
	// https://www.khronos.org/registry/VulkanSC/specs/1.0-extensions/man/html/vkGetPhysicalDeviceExternalBufferProperties.html
	PhysicalDeviceExternalBufferProperties(physicalDevice core1_0.PhysicalDevice, o PhysicalDeviceExternalBufferInfo, outData *ExternalBufferProperties) error
}

Extension contains all the commands for the khr_external_memory_capabilities extension

type ExternalBufferProperties

type ExternalBufferProperties struct {
	// ExternalMemoryProperties specifies various capabilities of the external handle type when
	// used with the specified Buffer creation parameters
	ExternalMemoryProperties ExternalMemoryProperties

	common.NextOutData
}

ExternalBufferProperties specifies supported external handle capabilities

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

func (*ExternalBufferProperties) PopulateHeader

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

func (*ExternalBufferProperties) PopulateOutData

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

type ExternalImageFormatProperties

type ExternalImageFormatProperties struct {
	// ExternalMemoryProperties specifies various capabilities of the external handle type when used
	// with the specified Image creation parameters
	ExternalMemoryProperties ExternalMemoryProperties

	common.NextOutData
}

ExternalImageFormatProperties specifies supported external handle properties

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

func (*ExternalImageFormatProperties) PopulateHeader

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

func (*ExternalImageFormatProperties) PopulateOutData

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

type ExternalMemoryFeatureFlags

type ExternalMemoryFeatureFlags int32

ExternalMemoryFeatureFlags specifies features of an external memory handle type

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

func (ExternalMemoryFeatureFlags) Register

func (f ExternalMemoryFeatureFlags) Register(str string)

func (ExternalMemoryFeatureFlags) String

type ExternalMemoryHandleTypeFlags

type ExternalMemoryHandleTypeFlags int32

ExternalMemoryHandleTypeFlags specifies external memory handle types

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

func (ExternalMemoryHandleTypeFlags) Register

func (f ExternalMemoryHandleTypeFlags) Register(str string)

func (ExternalMemoryHandleTypeFlags) String

type ExternalMemoryProperties

type ExternalMemoryProperties struct {
	// ExternalMemoryFeatures specifies the features of the handle type
	ExternalMemoryFeatures ExternalMemoryFeatureFlags
	// ExportFromImportedHandleTypes specifies which types of imported handle the handle type can
	// be exported from
	ExportFromImportedHandleTypes ExternalMemoryHandleTypeFlags
	// CompatibleHandleTypes specifies handle types which can be specified at the same time as the
	// handle type which creating an Image compatible with external memory
	CompatibleHandleTypes ExternalMemoryHandleTypeFlags
}

ExternalMemoryProperties specifies external memory handle type capabilities

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

func (ExternalMemoryProperties) PopulateCPointer

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

func (*ExternalMemoryProperties) PopulateOutData

func (o *ExternalMemoryProperties) PopulateOutData(cDataPointer unsafe.Pointer) error

type PhysicalDeviceExternalBufferInfo

type PhysicalDeviceExternalBufferInfo struct {
	// Flags describes additional parameters of the Buffer, corresponding to BufferCreateInfo.Flags
	Flags core1_0.BufferCreateFlags
	// Usage describes the intended usage of the Buffer, corresponding to BufferCreateInfo.Usage
	Usage core1_0.BufferUsageFlags
	// HandleType specifies the memory handle type that will be used with the memory
	// associated with the Buffer
	HandleType ExternalMemoryHandleTypeFlags

	common.NextOptions
}

PhysicalDeviceExternalBufferInfo specifies Buffer creation parameters

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

func (PhysicalDeviceExternalBufferInfo) PopulateCPointer

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

type PhysicalDeviceExternalImageFormatInfo

type PhysicalDeviceExternalImageFormatInfo struct {
	// HandleType specifies the memory handle type that will be used with the memory associated
	// with the Image
	HandleType ExternalMemoryHandleTypeFlags

	common.NextOptions
}

PhysicalDeviceExternalImageFormatInfo specifies external Image creation parameters

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

func (PhysicalDeviceExternalImageFormatInfo) PopulateCPointer

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

type PhysicalDeviceIDProperties

type PhysicalDeviceIDProperties struct {
	// DeviceUUID represents a universally-unique identifier for the device
	DeviceUUID uuid.UUID
	// DriverUUID represents a universally-unique identifier for the driver build
	// in use by the device
	DriverUUID uuid.UUID
	// DeviceLUID represents a locally-unique identifier for the device
	DeviceLUID uint64
	// DeviceNodeMask identifies the node within a linked device adapter corresponding to the
	// Device
	DeviceNodeMask uint32
	// DeviceLUIDValid is true if DeviceLUID contains a valid LUID and DeviceNodeMask contains
	// a valid node mask
	DeviceLUIDValid bool

	common.NextOutData
}

PhysicalDeviceIDProperties speicifes IDs related to the PhysicalDevice

func (*PhysicalDeviceIDProperties) PopulateHeader

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

func (*PhysicalDeviceIDProperties) PopulateOutData

func (o *PhysicalDeviceIDProperties) PopulateOutData(cDataPointer unsafe.Pointer, helpers ...any) (next unsafe.Pointer, err 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_external_memory_capabilities loaded

func CreateExtensionFromDriver

func CreateExtensionFromDriver(driver khr_external_memory_capabilities_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) PhysicalDeviceExternalBufferProperties

func (e *VulkanExtension) PhysicalDeviceExternalBufferProperties(physicalDevice core1_0.PhysicalDevice, o PhysicalDeviceExternalBufferInfo, outData *ExternalBufferProperties) error

Directories

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

Jump to

Keyboard shortcuts

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