Structures
VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR
Structure specifying the optimal image transfer granularity for a queue family
The VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR structure is defined as:
typedef struct VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR {
VkStructureType sType;
void* pNext;
VkExtent3D optimalImageTransferGranularity;
} VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR;
pub struct QueueFamilyOptimalImageTransferGranularityPropertiesKHR {
s_type: vk::StructureType,
p_next: *mut c_void,
optimal_image_transfer_granularity: vk::Extent3D,
}
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.optimalImageTransferGranularityis the optimal granularity for image copy operations in this queue family.
If this structure is included in the pNext chain of the
VkQueueFamilyProperties2 structure passed to
vkGetPhysicalDeviceQueueFamilyProperties2, then it is filled with the
optimal image transfer granularity for the specified queue family.
The value returned in optimalImageTransferGranularity has a unit of
compressed texel blocks for images having a block-compressed format, and a
unit of texels otherwise.
Possible values of optimalImageTransferGranularity are:
- (0,0,0) specifies that an image copy operation is optimal only
when copying whole mip levels, i.e. all of the following conditions are
met:
- The
x,y, andzmembers of a VkOffset3D are zero. - The
width,height, anddepthmembers of a VkExtent3D parameter match the width, height, and depth of the image subresource corresponding to the parameter, respectively.
- The
- (Ax, Ay, Az) where Ax, Ay, and Az
are all integer powers of two.
An image copy operation is optimal when all of the following conditions
are met:
widthof a VkExtent3D parameter is an integer multiple of Ax, or elsex+widthequals the width of the image subresource corresponding to the parameter.heightof a VkExtent3D parameter is an integer multiple of Ay, or elsey+heightequals the height of the image subresource corresponding to the parameter.depthof a VkExtent3D parameter is an integer multiple of Az, or elsez+depthequals the depth of the image subresource corresponding to the parameter.- If the format of the image corresponding to the parameters is one of the block-compressed formats then for the purposes of the above calculations the granularity must be scaled up by the compressed texel block dimensions.
While it is not required that copies are optimal, there may be a performance
cost for copies not aligned to
optimalImageTransferGranularity.Valid Usage (Implicit)
VUID-VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR-sType-sType
sType must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_OPTIMAL_IMAGE_TRANSFER_GRANULARITY_PROPERTIES_KHR