anv/formats: Don't advertise stencil texture/blit prior to Broadwell
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 17 Nov 2015 09:32:55 +0000 (01:32 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 17 Nov 2015 16:23:29 +0000 (08:23 -0800)
src/vulkan/anv_formats.c

index a231967a865906578e9469eadc24ead3f4b74f73..f1c8da00b3c63fae950ab7a3d91e08cd9d61a7c2 100644 (file)
@@ -257,9 +257,11 @@ anv_physical_device_get_format_properties(struct anv_physical_device *physical_d
 
    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;
-      tiled |= VK_FORMAT_FEATURE_BLIT_SOURCE_BIT;
+      if (physical_device->info->gen >= 8) {
+         tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
+         tiled |= VK_FORMAT_FEATURE_BLIT_SOURCE_BIT;
+      }
       if (format->depth_format) {
          tiled |= VK_FORMAT_FEATURE_BLIT_DESTINATION_BIT;
       }