anv: Allocate binding table blocks through the state pool
[mesa.git] / src / intel / vulkan / vk_format_info.h
index effed55c4bcd2696ad3bb1183290bb95414cad48..a680a6f24b319d4248c8589cfc62a6990d30cbd2 100644 (file)
@@ -21,7 +21,8 @@
  * IN THE SOFTWARE.
  */
 
-#pragma once
+#ifndef VK_FORMAT_INFO_H
+#define VK_FORMAT_INFO_H
 
 #include <stdbool.h>
 #include <vulkan/vulkan.h>
@@ -63,3 +64,12 @@ vk_format_is_depth_or_stencil(VkFormat format)
    const VkImageAspectFlags aspects = vk_format_aspects(format);
    return aspects & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT);
 }
+
+static inline bool
+vk_format_has_depth(VkFormat format)
+{
+   const VkImageAspectFlags aspects = vk_format_aspects(format);
+   return aspects & VK_IMAGE_ASPECT_DEPTH_BIT;
+}
+
+#endif /* VK_FORMAT_INFO_H */