Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype VkExternalMemoryHandleTypeFlagBits = VkExternalMemoryHandleTypeFlagBits VkFlags
- pattern VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT :: VkExternalMemoryHandleTypeFlagBits
- pattern VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT :: VkExternalMemoryHandleTypeFlagBits
- pattern VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT :: VkExternalMemoryHandleTypeFlagBits
- pattern VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT :: VkExternalMemoryHandleTypeFlagBits
- pattern VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT :: VkExternalMemoryHandleTypeFlagBits
- pattern VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT :: VkExternalMemoryHandleTypeFlagBits
- pattern VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT :: VkExternalMemoryHandleTypeFlagBits
- newtype VkExternalMemoryFeatureFlagBits = VkExternalMemoryFeatureFlagBits VkFlags
- pattern VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT :: VkExternalMemoryFeatureFlagBits
- pattern VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT :: VkExternalMemoryFeatureFlagBits
- pattern VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT :: VkExternalMemoryFeatureFlagBits
- pattern VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO :: VkStructureType
- pattern VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES :: VkStructureType
- pattern VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO :: VkStructureType
- pattern VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES :: VkStructureType
- pattern VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES :: VkStructureType
- type VK_LUID_SIZE = 8
- pattern VK_LUID_SIZE :: Integral a => a
- vkGetPhysicalDeviceExternalBufferProperties :: ("physicalDevice" ::: VkPhysicalDevice) -> ("pExternalBufferInfo" ::: Ptr VkPhysicalDeviceExternalBufferInfo) -> ("pExternalBufferProperties" ::: Ptr VkExternalBufferProperties) -> IO ()
- data VkExternalMemoryProperties = VkExternalMemoryProperties {}
- data VkPhysicalDeviceExternalImageFormatInfo = VkPhysicalDeviceExternalImageFormatInfo {}
- data VkExternalImageFormatProperties = VkExternalImageFormatProperties {}
- data VkPhysicalDeviceExternalBufferInfo = VkPhysicalDeviceExternalBufferInfo {}
- data VkExternalBufferProperties = VkExternalBufferProperties {}
- data VkPhysicalDeviceIDProperties = VkPhysicalDeviceIDProperties {}
- type VkExternalMemoryHandleTypeFlags = VkExternalMemoryHandleTypeFlagBits
- type VkExternalMemoryFeatureFlags = VkExternalMemoryFeatureFlagBits
Documentation
newtype VkExternalMemoryHandleTypeFlagBits Source #
VkExternalMemoryHandleTypeFlagBits - Bit specifying external memory handle types
Description
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT
specifies a POSIX file descriptor handle that has only limited valid usage outside of Vulkan and other compatible APIs. It must be compatible with the POSIX system callsdup
,dup2
,close
, and the non-standard system calldup3
. Additionally, it must be transportable over a socket using anSCM_RIGHTS
control message. It owns a reference to the underlying memory resource represented by its Vulkan memory object.
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT
specifies an NT handle that has only limited valid usage outside of Vulkan and other compatible APIs. It must be compatible with the functionsDuplicateHandle
,CloseHandle
,CompareObjectHandles
,GetHandleInformation
, andSetHandleInformation
. It owns a reference to the underlying memory resource represented by its Vulkan memory object.VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT
specifies a global share handle that has only limited valid usage outside of Vulkan and other compatible APIs. It is not compatible with any native APIs. It does not own a reference to the underlying memory resource represented its Vulkan memory object, and will therefore become invalid when all Vulkan memory objects associated with it are destroyed.VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT
specifies an NT handle returned byIDXGIResource1
::CreateSharedHandle
referring to a Direct3D 10 or 11 texture resource. It owns a reference to the memory used by the Direct3D resource.VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT
specifies a global share handle returned byIDXGIResource
::GetSharedHandle
referring to a Direct3D 10 or 11 texture resource. It does not own a reference to the underlying Direct3D resource, and will therefore become invalid when all Vulkan memory objects and Direct3D resources associated with it are destroyed.VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT
specifies an NT handle returned byID3D12Device
::CreateSharedHandle
referring to a Direct3D 12 heap resource. It owns a reference to the resources used by the Direct3D heap.VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT
specifies an NT handle returned byID3D12Device
::CreateSharedHandle
referring to a Direct3D 12 committed resource. It owns a reference to the memory used by the Direct3D resource.VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT
specifies a host pointer returned by a host memory allocation command. It does not own a reference to the underlying memory resource, and will therefore become invalid if the host memory is freed.VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT
specifies a host pointer to host mapped foreign memory. It does not own a reference to the underlying memory resource, and will therefore become invalid if the foreign memory is unmapped or otherwise becomes no longer available.VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT
is a file descriptor for a Linux dma_buf. It owns a reference to the underlying memory resource represented by its Vulkan memory object.VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
specifies anAHardwareBuffer
object defined by the Android NDK. See Android Hardware Buffers for more details of this handle type.
Some external memory handle types can only be shared within the same underlying physical device and/or the same driver version, as defined in the following table:
Handle type | VkPhysicalDeviceIDProperties ::driverUUID | VkPhysicalDeviceIDProperties ::deviceUUID |
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT | Must match | Must match |
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT | Must match | Must match |
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT | Must match | Must match |
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT | Must match | Must match |
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT | Must match | Must match |
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT | Must match | Must match |
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT | Must match | Must match |
VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT | No restriction | No restriction |
VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT | No restriction | No restriction |
VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT | No restriction | No restriction |
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID | No restriction | No restriction |
External memory handle types compatibility
Note
The above table does not restrict the drivers and devices with which
VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT
and
VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT
may be shared, as these handle types inherently mean memory that does
not come from the same device, as they import memory from the host or a
foreign device, respectively.
Note
Even though the above table does not restrict the drivers and devices
with which VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT
may be
shared, query mechanisms exist in the Vulkan API that prevent the import
of incompatible dma-bufs (such as
vkGetMemoryFdPropertiesKHR
)
and that prevent incompatible usage of dma-bufs (such as
VkPhysicalDeviceExternalBufferInfoKHR
and
VkPhysicalDeviceExternalImageFormatInfoKHR
).
See Also
VkExternalMemoryHandleTypeFlags
,
VkImportMemoryFdInfoKHR
,
VkImportMemoryHostPointerInfoEXT
,
VkImportMemoryWin32HandleInfoKHR
,
VkMemoryGetFdInfoKHR
,
VkMemoryGetWin32HandleInfoKHR
,
VkPhysicalDeviceExternalBufferInfo
,
VkPhysicalDeviceExternalImageFormatInfo
,
vkGetMemoryFdPropertiesKHR
,
vkGetMemoryHostPointerPropertiesEXT
,
vkGetMemoryWin32HandlePropertiesKHR
Instances
pattern VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT :: VkExternalMemoryHandleTypeFlagBits Source #
pattern VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT :: VkExternalMemoryHandleTypeFlagBits Source #
pattern VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT :: VkExternalMemoryHandleTypeFlagBits Source #
pattern VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT :: VkExternalMemoryHandleTypeFlagBits Source #
pattern VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT :: VkExternalMemoryHandleTypeFlagBits Source #
pattern VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT :: VkExternalMemoryHandleTypeFlagBits Source #
newtype VkExternalMemoryFeatureFlagBits Source #
VkExternalMemoryFeatureFlagBits - Bitmask specifying features of an external memory handle type
Description
VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT
specifies that images or buffers created with the specified parameters and handle type must use the mechanisms defined in the{html_spec_relative}#VK_NV_dedicated_allocation
extension to create (or import) a dedicated allocation for the image or buffer.
VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT
specifies that handles of this type can be exported from Vulkan memory objects.VK_INTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT
specifies that handles of this type can be imported as Vulkan memory objects.
Because their semantics in external APIs roughly align with that of an
image or buffer with a dedicated allocation in Vulkan, implementations
are required to report VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT
for the following external handle types:
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
for images only
Implementations must not report
VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT
for buffers with
external handle type
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
.
See Also
Instances
type VK_LUID_SIZE = 8 Source #
pattern VK_LUID_SIZE :: Integral a => a Source #
vkGetPhysicalDeviceExternalBufferProperties :: ("physicalDevice" ::: VkPhysicalDevice) -> ("pExternalBufferInfo" ::: Ptr VkPhysicalDeviceExternalBufferInfo) -> ("pExternalBufferProperties" ::: Ptr VkExternalBufferProperties) -> IO () Source #
vkGetPhysicalDeviceExternalBufferProperties - Query external handle types supported by buffers
Parameters
physicalDevice
is the physical device from which to query the buffer capabilities.
pExternalBufferInfo
points to an instance of theVkPhysicalDeviceExternalBufferInfo
structure, describing the parameters that would be consumed byvkCreateBuffer
.pExternalBufferProperties
points to an instance of theVkExternalBufferProperties
structure in which capabilities are returned.
Valid Usage (Implicit)
physicalDevice
must be a validVkPhysicalDevice
handle
pExternalBufferInfo
must be a valid pointer to a validVkPhysicalDeviceExternalBufferInfo
structurepExternalBufferProperties
must be a valid pointer to aVkExternalBufferProperties
structure
See Also
VkExternalBufferProperties
,
VkPhysicalDevice
,
VkPhysicalDeviceExternalBufferInfo
data VkExternalMemoryProperties Source #
VkExternalMemoryProperties - Structure specifying external memory handle type capabilities
Description
compatibleHandleTypes
must include at least handleType
. Inclusion
of a handle type in compatibleHandleTypes
does not imply the values
returned in
VkImageFormatProperties2
will be the same when
VkPhysicalDeviceExternalImageFormatInfo
::handleType
is set to that
type. The application is responsible for querying the capabilities of
all handle types intended for concurrent use in a single image and
intersecting them to obtain the compatible set of capabilities.
See Also
VkExternalBufferProperties
, VkExternalImageFormatProperties
,
VkExternalMemoryFeatureFlags
, VkExternalMemoryHandleTypeFlags
VkExternalMemoryProperties | |
|
Instances
data VkPhysicalDeviceExternalImageFormatInfo Source #
VkPhysicalDeviceExternalImageFormatInfo - Structure specifying external image creation parameters
Description
If handleType
is 0,
vkGetPhysicalDeviceImageFormatProperties2
will behave as if VkPhysicalDeviceExternalImageFormatInfo
was not
present, and VkExternalImageFormatProperties
will be ignored.
If handleType
is not compatible with the format
, type
, tiling
,
usage
, and flags
specified in
VkPhysicalDeviceImageFormatInfo2
,
then
vkGetPhysicalDeviceImageFormatProperties2
returns VK_ERROR_FORMAT_NOT_SUPPORTED
.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO
- If
handleType
is not0
,handleType
must be a validVkExternalMemoryHandleTypeFlagBits
value
See Also
VkPhysicalDeviceExternalImageFormatInfo | |
|
Instances
data VkExternalImageFormatProperties Source #
VkExternalImageFormatProperties - Structure specifying supported external handle properties
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES
See Also
VkExternalImageFormatProperties | |
|
Instances
data VkPhysicalDeviceExternalBufferInfo Source #
VkPhysicalDeviceExternalBufferInfo - Structure specifying buffer creation parameters
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO
pNext
must beNULL
flags
must be a valid combination ofVkBufferCreateFlagBits
valuesusage
must be a valid combination ofVkBufferUsageFlagBits
valuesusage
must not be0
handleType
must be a validVkExternalMemoryHandleTypeFlagBits
value
See Also
VkBufferCreateFlags
,
VkBufferUsageFlags
,
VkExternalMemoryHandleTypeFlagBits
,
VkStructureType
,
vkGetPhysicalDeviceExternalBufferProperties
,
vkGetPhysicalDeviceExternalBufferPropertiesKHR
VkPhysicalDeviceExternalBufferInfo | |
|
Instances
data VkExternalBufferProperties Source #
VkExternalBufferProperties - Structure specifying supported external handle capabilities
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES
pNext
must beNULL
See Also
VkExternalMemoryProperties
,
VkStructureType
,
vkGetPhysicalDeviceExternalBufferProperties
,
vkGetPhysicalDeviceExternalBufferPropertiesKHR
VkExternalBufferProperties | |
|
Instances
data VkPhysicalDeviceIDProperties Source #
VkPhysicalDeviceIDProperties - Structure specifying IDs related to the physical device
Description
deviceUUID
must be immutable for a given device across instances,
processes, driver APIs, driver versions, and system reboots.
Applications can compare the driverUUID
value across instance and
process boundaries, and can make similar queries in external APIs to
determine whether they are capable of sharing memory objects and
resources using them with the device.
deviceUUID
and/or driverUUID
must be used to determine whether a
particular external object can be shared between driver components,
where such a restriction exists as defined in the compatibility table
for the particular object type:
- External memory handle types compatibility
- External semaphore handle types compatibility
- External fence handle types compatibility
If deviceLUIDValid
is VK_FALSE
, the contents of deviceLUID
and
deviceNodeMask
are undefined. If deviceLUIDValid
is VK_TRUE
and
Vulkan is running on the Windows operating system, the contents of
deviceLUID
can be cast to an LUID
object and must be equal to
the locally unique identifier of a IDXGIAdapter1
object that
corresponds to physicalDevice
. If deviceLUIDValid
is VK_TRUE
,
deviceNodeMask
must contain exactly one bit. If Vulkan is running on
an operating system that supports the Direct3D 12 API and
physicalDevice
corresponds to an individual device in a linked device
adapter, deviceNodeMask
identifies the Direct3D 12 node corresponding
to physicalDevice
. Otherwise, deviceNodeMask
must be 1
.
Note
Although they have identical descriptions,
VkPhysicalDeviceIDProperties
::deviceUUID
may differ from
VkPhysicalDeviceProperties2
::pipelineCacheUUID
.
The former is intended to identify and correlate devices across API and
driver boundaries, while the latter is used to identify a compatible
device and driver combination to use when serializing and de-serializing
pipeline state.
Note
While VkPhysicalDeviceIDProperties
::deviceUUID
is specified to
remain consistent across driver versions and system reboots, it is not
intended to be usable as a serializable persistent identifier for a
device. It may change when a device is physically added to, removed
from, or moved to a different connector in a system while that system is
powered down. Further, there is no reasonable way to verify with
conformance testing that a given device retains the same UUID in a given
system across all driver versions supported in that system. While
implementations should make every effort to report consistent device
UUIDs across driver versions, applications should avoid relying on the
persistence of this value for uses other than identifying compatible
devices for external object sharing purposes.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES
See Also
VkBool32
, VkStructureType
VkPhysicalDeviceIDProperties | |
|
Instances
type VkExternalMemoryHandleTypeFlags = VkExternalMemoryHandleTypeFlagBits Source #
VkExternalMemoryHandleTypeFlags - Bitmask of VkExternalMemoryHandleTypeFlagBits
Description
VkExternalMemoryHandleTypeFlags
is a bitmask type for setting a mask
of zero or more VkExternalMemoryHandleTypeFlagBits
.
See Also
VkExportMemoryAllocateInfo
,
VkExternalMemoryBufferCreateInfo
,
VkExternalMemoryHandleTypeFlagBits
,
VkExternalMemoryImageCreateInfo
,
VkExternalMemoryProperties
type VkExternalMemoryFeatureFlags = VkExternalMemoryFeatureFlagBits Source #
VkExternalMemoryFeatureFlags - Bitmask of VkExternalMemoryFeatureFlagBits
Description
VkExternalMemoryFeatureFlags
is a bitmask type for setting a mask of
zero or more VkExternalMemoryFeatureFlagBits
.