freedreno: Move a6xx's setup_slices() to a shareable helper function.
[mesa.git] / src / gallium / drivers / freedreno / freedreno_resource.h
index bc972297a3523b2bce1a9a17d3c5c8844ed0166f..7a4f9fe2930645e9ed0d667580ae15f219cd7178 100644 (file)
@@ -113,6 +113,14 @@ pending(struct fd_resource *rsc, bool write)
        return false;
 }
 
+static inline bool
+has_depth(enum pipe_format format)
+{
+       const struct util_format_description *desc =
+                       util_format_description(format);
+       return util_format_has_depth(desc);
+}
+
 struct fd_transfer {
        struct pipe_transfer base;
        struct pipe_resource *staging_prsc;