VKGETPHYSICALDEVICEF(3)

NAME
vkGetPhysicalDeviceFormatProperties - Lists physical device's format capabilities.

C SPECIFICATION

    void vkGetPhysicalDeviceFormatProperties(
        VkPhysicalDevice                            physicalDevice,
        VkFormat                                    format,
        VkFormatProperties*                         pFormatProperties);

PARAMETERS

physicalDevice
    A handle to the physical device to query.

format
    The format whose properties to query.

pFormatProperties
    A pointer to the structure to receive the result of the query.

DESCRIPTION

vkGetPhysicalDeviceFormatProperties queries the device specified by physicalDevice for its support of the format specified in format and places the result in the structure pointed to by pFormatProperties. pFormatProperties should point to an instance of the VkFormatProperties structure, the definition of which is:

    typedef struct VkFormatProperties {
        VkFormatFeatureFlags    linearTilingFeatures;
        VkFormatFeatureFlags    optimalTilingFeatures;
        VkFormatFeatureFlags    bufferFeatures;
    } VkFormatProperties;

The linearTilingFeatures, optimalTilingFeatures, and bufferFeatures parameters are a bitwise combination of one or more of the bits specified in VkFormatFeatureFlagBits, the definition of which is:

    typedef enum VkFormatFeatureFlagBits {
        VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001,
        VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002,
        VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004,
        VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008,
        VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010,
        VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020,
        VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040,
        VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080,
        VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100,
        VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200,
        VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400,
        VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800,
        VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
    } VkFormatFeatureFlagBits;

The linearTilingFeatures member contains information about format support in linear images. The optimalTilingFeatures member contains information about format support in opaque tiled images. The bufferFeatures member contains information about format support in buffer objects.

    • If VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT is set then image views of this format may be sampled by shaders. This bit should only appear in linearTilingFeatures or optimalTilingFeatures.

    • If VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT is set then image views of this format may be used as storage images in shaders. This bit should only appear in linearTilingFeatures or optimalTilingFeatures.

    • If VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT is set is set then atomic operations may be performed by shaders on image views of this format. This bit should only appear in linearTilingFeatures or optimalTilingFeatures.

    • If VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT is set then buffer views of this format may be used to store uniform values accessible by shaders. This bit should only appear in bufferFeatures.

    • If VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT is set then buffer views of this format may be used to store texel data accessible to shaders. This bit should only appear in bufferFeatures.

    • If VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT is set then shaders may perform atomic operations on texel data stored in buffers in this format. This bit should only appear in bufferFeatures.

    • If VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT is set then this format may be used as a vertex attribute format. This bit should only appear in bufferFeatures.

    • If VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT is set then image views of this format may be used as color attachments. This bit should only appear in linearTilingFeatures or optimalTilingFeatures.

    • If VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT is set then blending is supported into color attachments of this format. This bit should only appear in linearTilingFeatures or optimalTilingFeatures.

    • If VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT is set then image views of this format may be used as depth or stencil attachments. This bit should only appear in linearTilingFeatures or optimalTilingFeatures.

    • If VK_FORMAT_FEATURE_BLIT_SRC_BIT is set then images of this format may be used as the source of a blit operation. This bit should only appear in linearTilingFeatures or optimalTilingFeatures.

    • If VK_FORMAT_FEATURE_BLIT_DST_BIT is set then images of this format may be used as the destination of a blit operation. This bit should only appear in linearTilingFeatures or optimalTilingFeatures.

If the physical device does not support the specified format then the output VkFormatProperties structure is filled with zeros.

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

SEE ALSO

vkGetPhysicalDeviceImageFormatProperties, vkGetPhysicalDeviceFeatures

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.