* GL_UNSIGNED_NORMALIZED = unsigned int representing [0,1]
* GL_SIGNED_NORMALIZED = signed int representing [-1, 1]
* GL_UNSIGNED_INT = an ordinary unsigned integer
+ * GL_INT = an ordinary signed integer
* GL_FLOAT = an ordinary float
*/
GLenum
}
+/**
+ * Is the given format a signed/unsigned integer format?
+ */
+GLboolean
+_mesa_is_format_integer(gl_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.
* \return GL_LINEAR or GL_SRGB
extern GLboolean
_mesa_is_format_packed_depth_stencil(gl_format format);
+extern GLboolean
+_mesa_is_format_integer(gl_format format);
+
extern GLenum
_mesa_get_format_color_encoding(gl_format format);