dEQP-VK: check against the proper VkFormatProperties member
authorAndres Gomez <agomez@igalia.com>
Thu, 8 Jun 2017 11:39:02 +0000 (14:39 +0300)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Sun, 18 Jun 2017 11:23:53 +0000 (07:23 -0400)
commitd41f0578749db200124a933a0bc6ace35881d02d
tree0e9b783511ffbd57e5940bf6140eac0faad8a530
parent49fd4828149468505e2cc191af916b36316a0afd
dEQP-VK: check against the proper VkFormatProperties member

VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT and
VK_FORMAT_FEATURE_TRANSFER_[SRC|DST]_BIT_KHR are flag values of the
VkFormatFeatureFlagBits enum that can only be hold and checked against
the linearTilingFeatures or optimalTilingFeatures members of the
VkFormatProperties struct but not the bufferFeatures member.

From the VulkanĀ® 1.0.51, with the VK_KHR_maintenance1 extension,
section 32.3.2 docs for VkFormatProperties:

   "* linearTilingFeatures is a bitmask of VkFormatFeatureFlagBits
      specifying features supported by images created with a tiling
      parameter of VK_IMAGE_TILING_LINEAR.

    * optimalTilingFeatures is a bitmask of VkFormatFeatureFlagBits
      specifying features supported by images created with a tiling
      parameter of VK_IMAGE_TILING_OPTIMAL.

    * bufferFeatures is a bitmask of VkFormatFeatureFlagBits
      specifying features supported by buffers."

    ...

    Bits which can be set in the VkFormatProperties features
    linearTilingFeatures, optimalTilingFeatures, and bufferFeatures
    are:

    typedef enum VkFormatFeatureFlagBits {

    ...

      VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080,

    ...

      VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
      VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,

    ...

    } VkFormatFeatureFlagBits;

    ...

    The following bits may be set in linearTilingFeatures and
    optimalTilingFeatures, specifying that the features are supported
    by images or image views created with the queried
    vkGetPhysicalDeviceFormatProperties::format:

    ...

    * VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT specifies that an image
      view can be used as a framebuffer color attachment and as an
      input attachment."

    ...

    * VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR specifies that an image
      can be used as a source image for copy commands.

    * VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR specifies that an image
      can be used as a destination image for copy commands and clear
      commands."

Affects:

dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_*

VK-GL-CTS issue: 483
Components: Vulkan

Change-Id: I89d21dbba2794429973830b0368259cf0cc24312
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp