vulkan/util: add vk_format_has_float_depth()
A small helper function to check if a format has a floating point depth value. Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31488>
This commit is contained in:
@@ -93,6 +93,18 @@ vk_format_depth_only(VkFormat format)
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool
|
||||
vk_format_has_float_depth(VkFormat format)
|
||||
{
|
||||
switch (format) {
|
||||
case VK_FORMAT_D32_SFLOAT:
|
||||
case VK_FORMAT_D32_SFLOAT_S8_UINT:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static inline VkFormat
|
||||
vk_format_stencil_only(VkFormat format)
|
||||
{
|
||||
|
Reference in New Issue
Block a user