Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
data VkMemoryDedicatedRequirements Source #
VkMemoryDedicatedRequirements - Structure describing dedicated allocation requirements of buffer and image resources
Description
If the VkMemoryDedicatedRequirements
structure is included in the
pNext
chain of the
VkMemoryRequirements2
structure passed as the pMemoryRequirements
parameter of a
vkGetBufferMemoryRequirements2
call, requiresDedicatedAllocation
may be VK_TRUE
under one of the following conditions:
- The
pNext
chain ofVkBufferCreateInfo
for the call tovkCreateBuffer
used to create the buffer being queried contained an instance ofVkExternalMemoryBufferCreateInfo
, and any of the handle types specified inVkExternalMemoryBufferCreateInfo
::handleTypes
requires dedicated allocation, as reported byvkGetPhysicalDeviceExternalBufferProperties
inVkExternalBufferProperties
::externalMemoryProperties
::externalMemoryFeatures
, therequiresDedicatedAllocation
field will be set toVK_TRUE
.
In all other cases, requiresDedicatedAllocation
must be set to
VK_FALSE
by the implementation whenever a
VkMemoryDedicatedRequirements
structure is included in the pNext
chain of the VkMemoryRequirements2
structure passed to a call to
vkGetBufferMemoryRequirements2
.
If the VkMemoryDedicatedRequirements
structure is included in the
pNext
chain of the VkMemoryRequirements2
structure passed as the
pMemoryRequirements
parameter of a vkGetBufferMemoryRequirements2
call and VK_BUFFER_CREATE_SPARSE_BINDING_BIT
was set in
VkBufferCreateInfo
::flags
when buffer
was created then the
implementation must set both prefersDedicatedAllocation
and
requiresDedicatedAllocation
to VK_FALSE
.
If the VkMemoryDedicatedRequirements
structure is included in the
pNext
chain of the VkMemoryRequirements2
structure passed as the
pMemoryRequirements
parameter of a vkGetImageMemoryRequirements2
call, requiresDedicatedAllocation
may be VK_TRUE
under one of the
following conditions:
- The
pNext
chain ofVkImageCreateInfo
for the call tovkCreateImage
used to create the image being queried contained an instance ofVkExternalMemoryImageCreateInfo
, and any of the handle types specified inVkExternalMemoryImageCreateInfo
::handleTypes
requires dedicated allocation, as reported byvkGetPhysicalDeviceImageFormatProperties2
inVkExternalImageFormatProperties
::externalMemoryProperties
::externalMemoryFeatures
, therequiresDedicatedAllocation
field will be set toVK_TRUE
.
In all other cases, requiresDedicatedAllocation
must be set to
VK_FALSE
by the implementation whenever a
VkMemoryDedicatedRequirements
structure is included in the pNext
chain of the VkMemoryRequirements2
structure passed to a call to
vkGetImageMemoryRequirements2
.
If the VkMemoryDedicatedRequirements
structure is included in the
pNext
chain of the VkMemoryRequirements2
structure passed as the
pMemoryRequirements
parameter of a vkGetImageMemoryRequirements2
call and VK_IMAGE_CREATE_SPARSE_BINDING_BIT
was set in
VkImageCreateInfo
::flags
when image
was created then the
implementation must set both prefersDedicatedAllocation
and
requiresDedicatedAllocation
to VK_FALSE
.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS
See Also
VkBool32
, VkStructureType
VkMemoryDedicatedRequirements | |
|
Instances
data VkMemoryDedicatedAllocateInfo Source #
VkMemoryDedicatedAllocateInfo - Specify a dedicated memory allocation resource
Valid Usage
- At least one of
image
andbuffer
must beVK_NULL_HANDLE
- If
image
is notVK_NULL_HANDLE
,VkMemoryAllocateInfo
::allocationSize
must equal theVkMemoryRequirements
::size
of the image - If
image
is notVK_NULL_HANDLE
,image
must have been created withoutVK_IMAGE_CREATE_SPARSE_BINDING_BIT
set inVkImageCreateInfo
::flags
- If
buffer
is notVK_NULL_HANDLE
,VkMemoryAllocateInfo
::allocationSize
must equal theVkMemoryRequirements
::size
of the buffer - If
buffer
is notVK_NULL_HANDLE
,buffer
must have been created withoutVK_BUFFER_CREATE_SPARSE_BINDING_BIT
set inVkBufferCreateInfo
::flags
- If
image
is notVK_NULL_HANDLE
andVkMemoryAllocateInfo
defines a memory import operation with handle typeVK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT
,VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT
,VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT
,VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT
,VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT
, orVK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT
, and the external handle was created by the Vulkan API, then the memory being imported must also be a dedicated image allocation andimage
must be identical to the image associated with the imported memory. - If
buffer
is notVK_NULL_HANDLE
andVkMemoryAllocateInfo
defines a memory import operation with handle typeVK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT
,VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT
,VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT
,VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT
,VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT
, orVK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT
, and the external handle was created by the Vulkan API, then the memory being imported must also be a dedicated buffer allocation andbuffer
must be identical to the buffer associated with the imported memory. - If
image
is notVK_NULL_HANDLE
andVkMemoryAllocateInfo
defines a memory import operation with handle typeVK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT
, the memory being imported must also be a dedicated image allocation andimage
must be identical to the image associated with the imported memory. - If
buffer
is notVK_NULL_HANDLE
andVkMemoryAllocateInfo
defines a memory import operation with handle typeVK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT
, the memory being imported must also be a dedicated buffer allocation andbuffer
must be identical to the buffer associated with the imported memory. - If
image
is notVK_NULL_HANDLE
,image
must not have been created withVK_IMAGE_CREATE_DISJOINT_BIT
set inVkImageCreateInfo
::flags
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
- If
image
is notVK_NULL_HANDLE
,image
must be a validVkImage
handle - If
buffer
is notVK_NULL_HANDLE
,buffer
must be a validVkBuffer
handle - Both of
buffer
, andimage
that are valid handles must have been created, allocated, or retrieved from the sameVkDevice
See Also
VkMemoryDedicatedAllocateInfo | |
|