mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
radv: add new vk_format_is_*() helpers
I think we should make RADV uses util_format everywhere. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7512>
This commit is contained in:
parent
a5227465c1
commit
684531fd37
1 changed files with 19 additions and 0 deletions
|
|
@ -30,6 +30,7 @@
|
|||
#include <assert.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <util/macros.h>
|
||||
#include <vulkan/util/vk_format.h>
|
||||
|
||||
enum vk_format_layout {
|
||||
/**
|
||||
|
|
@ -436,6 +437,24 @@ vk_format_is_int(VkFormat format)
|
|||
return channel >= 0 && desc->channel[channel].pure_integer;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
vk_format_is_uint(VkFormat format)
|
||||
{
|
||||
return util_format_is_pure_uint(vk_format_to_pipe_format(format));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
vk_format_is_sint(VkFormat format)
|
||||
{
|
||||
return util_format_is_pure_sint(vk_format_to_pipe_format(format));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
vk_format_is_unorm(VkFormat format)
|
||||
{
|
||||
return util_format_is_unorm(vk_format_to_pipe_format(format));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
vk_format_is_srgb(VkFormat format)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue