mesa/st: enable carry/borrow lowering pass
[mesa.git] / src / mesa / main / formats.c
index fb2501c69a2ac9fe6e361803974f4b10d4b81118..5c670115ef7781d8acd2f191c37853348d6cfe18 100644 (file)
@@ -2035,6 +2035,15 @@ _mesa_is_format_signed(mesa_format format)
    }
 }
 
+/**
+ * Is the given format an integer format?
+ */
+GLboolean
+_mesa_is_format_integer(mesa_format format)
+{
+   const struct gl_format_info *info = _mesa_get_format_info(format);
+   return (info->DataType == GL_INT || info->DataType == GL_UNSIGNED_INT);
+}
 
 /**
  * Return color encoding for given format.