radv: Disable depth & stencil tests when the depthbuffer doesn't support it.
[mesa.git] / src / amd / vulkan / vk_format.h
index 13ac1793460491d9e8ef368c28afc0bb0def9b7e..c2c7ca4ce249c8bb987ed3628832dd913ade661e 100644 (file)
@@ -366,6 +366,19 @@ vk_format_is_depth(VkFormat format)
        return vk_format_has_depth(desc);
 }
 
+static inline bool
+vk_format_is_stencil(VkFormat format)
+{
+       const struct vk_format_description *desc = vk_format_description(format);
+
+       assert(desc);
+       if (!desc) {
+               return false;
+       }
+
+       return vk_format_has_stencil(desc);
+}
+
 static inline bool
 vk_format_is_color(VkFormat format)
 {
@@ -396,6 +409,13 @@ vk_format_is_int(VkFormat format)
        return channel >= 0 && desc->channel[channel].pure_integer;
 }
 
+static inline bool
+vk_format_is_srgb(VkFormat format)
+{
+       const struct vk_format_description *desc = vk_format_description(format);
+       return desc->colorspace == VK_FORMAT_COLORSPACE_SRGB;
+}
+
 static inline VkFormat
 vk_format_stencil_only(VkFormat format)
 {