Function Prototype
vkGetRenderAreaGranularity
Returns the granularity for optimal render area
To query the render area granularity, call:
void vkGetRenderAreaGranularity(
VkDevice device,
VkRenderPass renderPass,
VkExtent2D* pGranularity);
deviceis the logical device that owns the render pass.renderPassis a handle to a render pass.pGranularityis a pointer to a VkExtent2D structure in which the granularity is returned.
The conditions leading to an optimal renderArea are:
- the
offset.xmember inrenderAreais a multiple of thewidthmember of the returned VkExtent2D (the horizontal granularity). - the
offset.ymember inrenderAreais a multiple of theheightmember of the returned VkExtent2D (the vertical granularity). - either the
extent.widthmember inrenderAreais a multiple of the horizontal granularity oroffset.x+extent.widthis equal to thewidthof theframebufferin the VkRenderPassBeginInfo. - either the
extent.heightmember inrenderAreais a multiple of the vertical granularity oroffset.y+extent.heightis equal to theheightof theframebufferin the VkRenderPassBeginInfo.
Subpass dependencies are not affected by the render area, and apply to the entire image subresources attached to the framebuffer as specified in the description of automatic layout transitions. Similarly, pipeline barriers are valid even if their effect extends outside the render area.
Valid Usage (Implicit)
VUID-vkGetRenderAreaGranularity-device-parameter
device must be a valid VkDevice handle
VUID-vkGetRenderAreaGranularity-renderPass-parameter
renderPass must be a valid VkRenderPass handle
VUID-vkGetRenderAreaGranularity-pGranularity-parameter
pGranularity must be a valid pointer to a VkExtent2D structure
VUID-vkGetRenderAreaGranularity-renderPass-parent
renderPass must have been created, allocated, or retrieved from device