From 88401e031bd3228354ce4eb410c0034217be15cb Mon Sep 17 00:00:00 2001 From: John Brooks Date: Mon, 15 Aug 2022 10:59:17 -0400 Subject: [PATCH] vulkan: Introduce vk_format_is_block_compressed function MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: John Brooks Reviewed-by: Samuel Pitoiset Acked-by: Acked-by: Marek Olšák Part-of: --- src/vulkan/util/vk_format.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vulkan/util/vk_format.h b/src/vulkan/util/vk_format.h index df5c90f..48994bd 100644 --- a/src/vulkan/util/vk_format.h +++ b/src/vulkan/util/vk_format.h @@ -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) { -- 2.7.4