# vkGetRenderingAreaGranularity(3) Manual Page

## Name

vkGetRenderingAreaGranularity - Returns the granularity for dynamic rendering optimal render area

Loading… please wait.

## 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

- `device` is the logical device that owns the render pass instance.

- `pRenderingAreaInfo` is a pointer to a VkRenderingAreaInfo structure specifying details of the render pass instance to query the render area granularity for.

- `pGranularity` is a pointer to a VkExtent2D structure in which the granularity is returned.

## Description

The conditions leading to an optimal `renderArea` are:

- the `offset.x` member in `renderArea` is a multiple of the `width` member of the returned VkExtent2D (the horizontal granularity).

- the `offset.y` member in `renderArea` is a multiple of the `height` member of the returned VkExtent2D (the vertical granularity).

- either the `extent.width` member in `renderArea` is a multiple of the horizontal granularity or `offset.x`+`extent.width` is equal to the `width` of each attachment used in the render pass instance.

- either the `extent.height` member in `renderArea` is a multiple of the vertical granularity or `offset.y`+`extent.height` is equal to the `height` of each attachment used in the render pass instance.

Valid Usage (Implicit)

- VUID-vkGetRenderingAreaGranularity-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetRenderingAreaGranularity-pRenderingAreaInfo-parameter
  `pRenderingAreaInfo` must be a valid pointer to a valid VkRenderingAreaInfo structure

- VUID-vkGetRenderingAreaGranularity-pGranularity-parameter
  `pGranularity` must be a valid pointer to a VkExtent2D structure

## See Also

VK_KHR_maintenance5, VK_VERSION_1_4, VkDevice, VkExtent2D, VkRenderingAreaInfo

## 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.

## Copyright

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0