| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Core11.Promoted_from_VK_KHR_dedicated_allocation
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
pNextchain ofVkBufferCreateInfofor the call tovkCreateBufferused to create the buffer being queried contained an instance ofVkExternalMemoryBufferCreateInfo, and any of the handle types specified inVkExternalMemoryBufferCreateInfo::handleTypesrequires dedicated allocation, as reported byvkGetPhysicalDeviceExternalBufferPropertiesinVkExternalBufferProperties::externalMemoryProperties::externalMemoryFeatures, therequiresDedicatedAllocationfield 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
pNextchain ofVkImageCreateInfofor the call tovkCreateImageused to create the image being queried contained an instance ofVkExternalMemoryImageCreateInfo, and any of the handle types specified inVkExternalMemoryImageCreateInfo::handleTypesrequires dedicated allocation, as reported byvkGetPhysicalDeviceImageFormatProperties2inVkExternalImageFormatProperties::externalMemoryProperties::externalMemoryFeatures, therequiresDedicatedAllocationfield 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)
sTypemust beVK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS
See Also
VkBool32, VkStructureType
Constructors
| VkMemoryDedicatedRequirements | |
Fields
| |
data VkMemoryDedicatedAllocateInfo Source #
VkMemoryDedicatedAllocateInfo - Specify a dedicated memory allocation resource
Description
Valid Usage
- At least one of
imageandbuffermust beVK_NULL_HANDLE
- If
imageis notVK_NULL_HANDLE,VkMemoryAllocateInfo::allocationSizemust equal theVkMemoryRequirements::sizeof the image - If
imageis notVK_NULL_HANDLE,imagemust have been created withoutVK_IMAGE_CREATE_SPARSE_BINDING_BITset inVkImageCreateInfo::flags - If
bufferis notVK_NULL_HANDLE,VkMemoryAllocateInfo::allocationSizemust equal theVkMemoryRequirements::sizeof the buffer - If
bufferis notVK_NULL_HANDLE,buffermust have been created withoutVK_BUFFER_CREATE_SPARSE_BINDING_BITset inVkBufferCreateInfo::flags - If
imageis notVK_NULL_HANDLEandVkMemoryAllocateInfodefines 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 andimagemust be identical to the image associated with the imported memory. - If
bufferis notVK_NULL_HANDLEandVkMemoryAllocateInfodefines 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 andbuffermust be identical to the buffer associated with the imported memory. - If
imageis notVK_NULL_HANDLEandVkMemoryAllocateInfodefines 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 andimagemust be identical to the image associated with the imported memory. - If
bufferis notVK_NULL_HANDLEandVkMemoryAllocateInfodefines 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 andbuffermust be identical to the buffer associated with the imported memory. - If
imageis notVK_NULL_HANDLE,imagemust not have been created withVK_IMAGE_CREATE_DISJOINT_BITset inVkImageCreateInfo::flags
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
- If
imageis notVK_NULL_HANDLE,imagemust be a validVkImagehandle - If
bufferis notVK_NULL_HANDLE,buffermust be a validVkBufferhandle - Both of
buffer, andimagethat are valid handles must have been created, allocated, or retrieved from the sameVkDevice
See Also
Constructors
| VkMemoryDedicatedAllocateInfo | |
Fields
| |