vulkan: Introduce vk_format_is_block_compressed function
authorJohn Brooks <john@fastquake.com>
Mon, 15 Aug 2022 14:59:17 +0000 (10:59 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 23 Aug 2022 19:01:17 +0000 (19:01 +0000)
Signed-off-by: John Brooks <john@fastquake.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17970>

src/vulkan/util/vk_format.h

index df5c90f..48994bd 100644 (file)
@@ -159,6 +159,12 @@ vk_format_is_compressed(VkFormat format)
    return vk_format_get_blockwidth(format) > 1;
 }
 
+static inline bool
+vk_format_is_block_compressed(VkFormat format)
+{
+   return util_format_is_compressed(vk_format_to_pipe_format(format));
+}
+
 static inline const struct util_format_description *
 vk_format_description(VkFormat format)
 {