C Specification
To query the render area granularity for a render pass instance, call:
// Provided by VK_VERSION_1_4
void vkGetRenderingAreaGranularity(
VkDevice device,
const VkRenderingAreaInfo* pRenderingAreaInfo,
VkExtent2D* pGranularity);
or the equivalent command
// Provided by VK_KHR_maintenance5
void vkGetRenderingAreaGranularityKHR(
VkDevice device,
const VkRenderingAreaInfo* pRenderingAreaInfo,
VkExtent2D* pGranularity);
Parameters
-
deviceis the logical device that owns the render pass instance. -
pRenderingAreaInfois a pointer to a VkRenderingAreaInfo structure specifying details of the render pass instance to query the render area granularity for. -
pGranularityis a pointer to a VkExtent2D structure in which the granularity is returned.
Description
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 each attachment used in the render pass instance. -
either the
extent.heightmember inrenderAreais a multiple of the vertical granularity oroffset.y+extent.heightis equal to theheightof each attachment used in the render pass instance.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.