vulkan: Common vk_format_get_component_bits

RADV and PowerVR use the same implementation.
Turnip does use a slightly modified version but the helper only has one
use -> just inline it and get rid of turnip's vk_format.h.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17515>
This commit is contained in:
Konstantin Seurer
2022-07-13 14:20:36 +02:00
committed by Marge Bot
parent 2e71e23188
commit fc26fbde3d
6 changed files with 22 additions and 77 deletions
-10
View File
@@ -75,16 +75,6 @@ static inline bool vk_format_has_32bit_component(VkFormat vk_format)
return false;
}
static inline uint
vk_format_get_component_bits(VkFormat vk_format,
enum util_format_colorspace colorspace,
uint32_t component)
{
return util_format_get_component_bits(vk_format_to_pipe_format(vk_format),
colorspace,
component);
}
static inline bool vk_format_is_normalized(VkFormat vk_format)
{
const struct util_format_description *desc =