VKGETPHYSICALDEVICES(3)

NAME
vkGetPhysicalDeviceSparseImageFormatProperties - Retrieve properties of an image format applied to sparse images.

C SPECIFICATION

    void vkGetPhysicalDeviceSparseImageFormatProperties(
        VkPhysicalDevice                            physicalDevice,
        VkFormat                                    format,
        VkImageType                                 type,
        VkSampleCountFlagBits                       samples,
        VkImageUsageFlags                           usage,
        VkImageTiling                               tiling,
        uint32_t*                                   pPropertyCount,
        VkSparseImageFormatProperties*              pProperties);

PARAMETERS

physicalDevice
    The physical device whose properties to query.

format
    The format about which to query the device.

type
    The dimensionality of the image.

samples
    The number of multisamples in the image.

usage
    The intended usages for the image.

tiling
    A set of flags defining the tiling of the image.

pPropertyCount
    A pointer to a variable that contains the number of properties to query.

pProperties
    A pointer to an array of VkSparseImageFormatProperties structures that will receive the results of the query.

DESCRIPTION

vkGetPhysicalDeviceSparseImageFormatProperties queries the physical device specified in physicalDevice for its support of the format described by the remaining parameters to the command should that format be used with a sparse image.

format specifies the format of the image and is a member of the VkFormat enumeration. type specifies the type of the image and is a member of the VkImageType enumeration, the definition of which is:

    typedef enum VkImageType {
        VK_IMAGE_TYPE_1D = 0,
        VK_IMAGE_TYPE_2D = 1,
        VK_IMAGE_TYPE_3D = 2,
    } VkImageType;

The samples parameter specifies the number of samples to be used in the image and must be a supported sample count for the image format. The possible values are:

    typedef enum VkSampleCountFlagBits {
        VK_SAMPLE_COUNT_1_BIT = 0x00000001,
        VK_SAMPLE_COUNT_2_BIT = 0x00000002,
        VK_SAMPLE_COUNT_4_BIT = 0x00000004,
        VK_SAMPLE_COUNT_8_BIT = 0x00000008,
        VK_SAMPLE_COUNT_16_BIT = 0x00000010,
        VK_SAMPLE_COUNT_32_BIT = 0x00000020,
        VK_SAMPLE_COUNT_64_BIT = 0x00000040,
    } VkSampleCountFlagBits;

If samples is VK_SAMPLE_COUNT_1_BIT then the image is not multisampled.

The usage parameter is a bitfield made up of members of the VkImageUsageFlagBits enumeration and specifies the intended usage for the image. The definition of VkImageUsageFlagBits is:

    typedef enum VkImageUsageFlagBits {
        VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001,
        VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002,
        VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004,
        VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008,
        VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010,
        VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020,
        VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040,
        VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080,
    } VkImageUsageFlagBits;

On input, pPropertyCount points to a variable that is populated with the number of aspects to query about the image. pProperties is a pointer to an array of at least this many VkSparseImageFormatProperties structures, the definition of which is:

    typedef struct VkSparseImageFormatProperties {
        VkImageAspectFlags          aspectMask;
        VkExtent3D                  imageGranularity;
        VkSparseImageFormatFlags    flags;
    } VkSparseImageFormatProperties;

On return, the variable pointed to by pPropertyCount will be overwritten with the number of entries in pProperties that were populated by the command.

In the VkSparseImageFormatProperties structure, aspectMask contains the aspects of the image to which this property applies. imageGranularity contains the size, in texels at which image memory is to be bound to a sparse image with the specified properties through a call to vkQueueBindSparse. flags contains a bitfield of the supported flags for this image format, and is a bitwise combination of members of the VkSparseImageFormatFlagBits enumeration, the definition of which is:

    typedef enum VkSparseImageFormatFlagBits {
        VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001,
        VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 0x00000002,
        VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004,
    } VkSparseImageFormatFlagBits;

VALID USAGE

    • physicalDevice must be a valid VkPhysicalDevice handle

    • format must be a valid VkFormat value

    • pFormatProperties must be a pointer to a VkFormatProperties structure

RETURN VALUE

vkGetPhysicalDeviceSparseImageFormatProperties does not return a value. However, on success, the variable pPropertyCount is overwritten with the number of structures written into the array pointed to by pProperties. On failure, the variable is overwritten with zero.

SEE ALSO

vkGetImageSparseMemoryRequirements, vkGetPhysicalDeviceImageFormatProperties, vkGetPhysicalDeviceFormatProperties

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.