vk: Advertise that depthstencil formats support sampling
authorChad Versace <chad.versace@intel.com>
Mon, 28 Sep 2015 17:52:11 +0000 (10:52 -0700)
committerChad Versace <chad.versace@intel.com>
Mon, 28 Sep 2015 18:53:39 +0000 (11:53 -0700)
Let vkGetPhysicalDeviceFormatProperties() set
VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT for tiled depthstencil images.

src/vulkan/anv_formats.c

index 3ec2c7774aa53eeabd8760cb9368c74edc81be7c..2c3487c18cc562cc12ac5ac09c4eb1a16da970dc 100644 (file)
@@ -267,6 +267,7 @@ VkResult anv_GetPhysicalDeviceFormatProperties(
 
    uint32_t linear = 0, tiled = 0;
    if (anv_format_is_depth_or_stencil(format)) {
+      tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
       tiled |= VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT;
    } else {
       /* The surface_formats table only contains color formats */