radv: Remove vk_format_has_stencil/depth helpers.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797>
This commit is contained in:
Bas Nieuwenhuizen 2021-01-30 22:22:16 +01:00 committed by Marge Bot
parent fa26c09fb0
commit 8a61f31160
3 changed files with 3 additions and 17 deletions

View file

@ -445,8 +445,8 @@ radv_get_surface_flags(struct radv_device *device,
const struct util_format_description *desc = vk_format_description(format);
bool is_depth, is_stencil;
is_depth = vk_format_has_depth(desc);
is_stencil = vk_format_has_stencil(desc);
is_depth = util_format_has_depth(desc);
is_stencil = util_format_has_stencil(desc);
flags = RADEON_SURF_SET(array_mode, MODE);

View file

@ -545,7 +545,7 @@ static VkImageLayout
stencil_desc_layout(const VkAttachmentDescription2KHR *att_desc, bool final)
{
const struct util_format_description *desc = vk_format_description(att_desc->format);
if (!vk_format_has_stencil(desc))
if (!util_format_has_stencil(desc))
return VK_IMAGE_LAYOUT_UNDEFINED;
const VkImageLayout main_layout =

View file

@ -144,20 +144,6 @@ vk_format_is_subsampled(VkFormat format)
return util_format_is_subsampled_422(vk_format_to_pipe_format(format));
}
static inline bool
vk_format_has_depth(const struct util_format_description *desc)
{
return desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS &&
desc->swizzle[0] != PIPE_SWIZZLE_NONE;
}
static inline bool
vk_format_has_stencil(const struct util_format_description *desc)
{
return desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS &&
desc->swizzle[1] != PIPE_SWIZZLE_NONE;
}
static inline bool
vk_format_is_depth_or_stencil(VkFormat format)
{