VKGETIMAGEMEMORYREQU(3)

NAME
vkGetImageMemoryRequirements - Returns the memory requirements for specified Vulkan object.

C SPECIFICATION

    void vkGetImageMemoryRequirements(
        VkDevice                                    device,
        VkImage                                     image,
        VkMemoryRequirements*                       pMemoryRequirements);

PARAMETERS

device
    Logical device which owns image.

image
    Object to query.

pMemoryRequirements
    Pointer to a data structure to receive the result of the query.

DESCRIPTION

vkGetImageMemoryRequirements retrieves memory requirements for the image object whose handle is given in image. The pMemoryRequirements parameter should point to an instance of an VkMemoryRequirements structure which will be filled with the memory requirements of the image object. The definition of VkMemoryRequirements is as follows:

    typedef struct VkMemoryRequirements {
        VkDeviceSize    size;
        VkDeviceSize    alignment;
        uint32_t        memoryTypeBits;
    } VkMemoryRequirements;

The size member of VkMemoryRequirements reports the size of the memory allocation, measured in bytes, required by the image. alignment reports the required alignment of the memory allocation, also measured in bytes. When memory is bound to the image object, the offset of the range within the memory object must be an integer multiple of this value. The memoryTypeBits member is a bitfield with each set bit representing a valid memory type. Memory types for a device may be determined by calling vkGetPhysicalDeviceMemoryProperties. The least significant bit if memoryTypeBits represents the first memory type returned from vkGetPhysicalDeviceMemoryProperties, the next bit represents the second memory type and so on.

VALID USAGE

    • device must be a valid VkDevice handle

    • image must be a valid VkImage handle

    • pMemoryRequirements must be a pointer to a VkMemoryRequirements structure

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

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

SEE ALSO

vkBindImageMemory, vkGetPhysicalDeviceMemoryProperties

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.