OSDN Git Service

radv: clean up radv_htile_enabled()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 6 Apr 2018 13:57:48 +0000 (15:57 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 9 Apr 2018 09:21:12 +0000 (11:21 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_private.h

index b4952b5..f954d67 100644 (file)
@@ -1390,12 +1390,6 @@ radv_vi_dcc_enabled(const struct radv_image *image, unsigned level)
        return image->surface.dcc_size && level < image->surface.num_dcc_levels;
 }
 
-static inline bool
-radv_htile_enabled(const struct radv_image *image, unsigned level)
-{
-       return image->surface.htile_size && level == 0;
-}
-
 /**
  * Return whether the image has CMASK metadata for color surfaces.
  */
@@ -1432,6 +1426,15 @@ radv_image_has_htile(const struct radv_image *image)
        return image->surface.htile_size;
 }
 
+/**
+ * Return whether HTILE metadata is enabled for a level.
+ */
+static inline bool
+radv_htile_enabled(const struct radv_image *image, unsigned level)
+{
+       return radv_image_has_htile(image) && level == 0;
+}
+
 unsigned radv_image_queue_family_mask(const struct radv_image *image, uint32_t family, uint32_t queue_family);
 
 static inline uint32_t