radv/gfx9: don't expose linear depth on vega.
authorDave Airlie <airlied@redhat.com>
Mon, 21 Aug 2017 04:11:04 +0000 (14:11 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 24 Aug 2017 00:14:15 +0000 (01:14 +0100)
This just zeros out the linear flags for gfx9 + depth formats.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_formats.c

index 57bde9e7cdc072ace2e04b19e3b0618fd0416378..c19a9a37a49cd35ac14632fbcdacf729fbc3a6d0 100644 (file)
@@ -578,6 +578,10 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical
                                 VK_FORMAT_FEATURE_BLIT_DST_BIT;
                        tiled |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR |
                                 VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR;
+
+                       /* GFX9 doesn't support linear depth surfaces */
+                       if (physical_device->rad_info.chip_class >= GFX9)
+                               linear = 0;
                }
        } else {
                bool linear_sampling;