Structures
VkMemoryDedicatedRequirements
Structure describing dedicated allocation requirements of buffer and image resources
The VkMemoryDedicatedRequirements structure is defined as:
typedef struct VkMemoryDedicatedRequirements {
VkStructureType sType;
void* pNext;
VkBool32 prefersDedicatedAllocation;
VkBool32 requiresDedicatedAllocation;
} VkMemoryDedicatedRequirements;
pub struct MemoryDedicatedRequirements {
s_type: vk::StructureType,
p_next: *mut c_void,
prefers_dedicated_allocation: vk::Bool32,
requires_dedicated_allocation: vk::Bool32,
}
typedef VkMemoryDedicatedRequirements VkMemoryDedicatedRequirementsKHR;
type MemoryDedicatedRequirementsKHR = vk::MemoryDedicatedRequirements;
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.prefersDedicatedAllocationspecifies that the implementation would prefer a dedicated allocation for this resource. The application is still free to suballocate the resource but it may get better performance if a dedicated allocation is used.requiresDedicatedAllocationspecifies that a dedicated allocation is required for this resource.
To determine the dedicated allocation requirements of a buffer or image
or tensor
resource, add a VkMemoryDedicatedRequirements structure to the
pNext chain of the VkMemoryRequirements2 structure passed as the
pMemoryRequirements parameter of vkGetBufferMemoryRequirements2,
vkGetTensorMemoryRequirementsARM,
vkGetDeviceBufferMemoryRequirements,
vkGetDeviceImageMemoryRequirements,
or vkGetImageMemoryRequirements2 respectively.
Constraints on the values returned for buffer resources are:
requiresDedicatedAllocationmay beVK_TRUEif thepNextchain of VkBufferCreateInfo for the call tovkCreateBufferused to create the buffer being queried included a VkExternalMemoryBufferCreateInfo structure, and any of the handle types specified in VkExternalMemoryBufferCreateInfo::handleTypesrequires dedicated allocation, as reported by vkGetPhysicalDeviceExternalBufferProperties inVkExternalBufferProperties::externalMemoryProperties.externalMemoryFeatures. Otherwise,requiresDedicatedAllocationwill beVK_FALSE.- When the implementation sets
requiresDedicatedAllocationtoVK_TRUE, it must also setprefersDedicatedAllocationtoVK_TRUE. - If
VK_BUFFER_CREATE_SPARSE_BINDING_BITwas set in VkBufferCreateInfo::flagswhenbufferwas created, then bothprefersDedicatedAllocationandrequiresDedicatedAllocationwill beVK_FALSE.
Constraints on the values returned for image resources are:
requiresDedicatedAllocationmay beVK_TRUEif thepNextchain of VkImageCreateInfo for the call to vkCreateImage used to create the image being queried included a VkExternalMemoryImageCreateInfo structure, and any of the handle types specified in VkExternalMemoryImageCreateInfo::handleTypesrequires dedicated allocation, as reported by vkGetPhysicalDeviceImageFormatProperties2 inVkExternalImageFormatProperties::externalMemoryProperties.externalMemoryFeatures.requiresDedicatedAllocationmay beVK_TRUEif the image’s tiling isVK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT.requiresDedicatedAllocationwill otherwise beVK_FALSE- If
VK_IMAGE_CREATE_SPARSE_BINDING_BITwas set in VkImageCreateInfo::flagswhenimagewas created, then bothprefersDedicatedAllocationandrequiresDedicatedAllocationwill beVK_FALSE.
Constraints on the values returned for tensor resources are:
requiresDedicatedAllocationmay beVK_TRUEif thepNextchain of VkTensorCreateInfoARM for the call tovkCreateTensorARMused to create the tensor being queried included a VkExternalMemoryTensorCreateInfoARM structure, and any of the handle types specified in VkExternalMemoryTensorCreateInfoARM::handleTypesrequires dedicated allocation, as reported by vkGetPhysicalDeviceExternalTensorPropertiesARM inVkExternalTensorPropertiesARM::externalMemoryProperties.externalMemoryFeatures.requiresDedicatedAllocationwill otherwise beVK_FALSE.- When the implementation sets
requiresDedicatedAllocationtoVK_TRUE, it must also setprefersDedicatedAllocationtoVK_TRUE.
Valid Usage (Implicit)
VUID-VkMemoryDedicatedRequirements-sType-sType
sType must be VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS