VKGETRENDERAREAGRANU(3)

NAME
vkGetRenderAreaGranularity - Returns the granularity for optimal render area.

C SPECIFICATION

    void vkGetRenderAreaGranularity(
        VkDevice                                    device,
        VkRenderPass                                renderPass,
        VkExtent2D*                                 pGranularity);

PARAMETERS

device
    The device in which renderPass was created.

renderPass
    The render pass for which to query the render area granularity.

pGranularity
    A pointer to a structure containing the return value.

DESCRIPTION

vkGetRenderAreaGranularity returns the granularity at which the renderArea member of the VkRenderPassBeginInfo structure should be for optimal performance. device must be the device which created renderPass. The renderPass parameter must be the same as the one given in the VkRenderPassBeginInfo structure for which the render area is relevant. pGranularity must point to an instance of the VkExtent2D structure, which will be filled if vkGetRenderAreaGranularity is successful. The definitions of the VkExtent2D structure is:

    typedef struct VkExtent2D {
        uint32_t    width;
        uint32_t    height;
    } VkExtent2D;

The conditions leading to an optimal renderArea are:

    • the offset.x member of renderArea must be a multiple of the width member of the returned VkExtent2D (the horizontal granularity).

    • the offset.y member of renderArea must be a multiple of the height of the returned VkExtent2D (the vertical granularity).

    • it must be true that either the offset.width member of renderArea is a multiple of the horizontal granularity or that offset.x + offset.width is equal to the width of the framebuffer in the VkRenderPassBeginInfo.

    • it must be true that either the offset.height member of renderArea is a multiple of the vertical granularity or that offset.y + offset.height is equal to the height of the framebuffer in the VkRenderPassBeginInfo.

VALID USAGE

    • device must be a valid VkDevice handle

    • renderPass must be a valid VkRenderPass handle

    • pGranularity must be a pointer to a VkExtent2D structure

    • renderPass must have been created, allocated or retrieved from device

    • Each of device and renderPass must have been created, allocated or retrieved from the same VkPhysicalDevice

SEE ALSO

vkCmdBeginRenderPass

COPYRIGHT

Copyright © 2014-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

AUTHOR

Khronos Group
    Author.