#include "imports.h"
#include "formats.h"
#include "mfeatures.h"
+#include "macros.h"
/**
}
+GLuint
+_mesa_get_format_max_bits(gl_format format)
+{
+ const struct gl_format_info *info = _mesa_get_format_info(format);
+ GLuint max = MAX2(info->RedBits, info->GreenBits);
+ max = MAX2(max, info->BlueBits);
+ max = MAX2(max, info->AlphaBits);
+ max = MAX2(max, info->LuminanceBits);
+ max = MAX2(max, info->IntensityBits);
+ max = MAX2(max, info->DepthBits);
+ max = MAX2(max, info->StencilBits);
+ return max;
+}
+
+
/**
* Return the data type (or more specifically, the data representation)
* for the given format.
extern GLint
_mesa_get_format_bits(gl_format format, GLenum pname);
+extern GLuint
+_mesa_get_format_max_bits(gl_format format);
+
extern GLenum
_mesa_get_format_datatype(gl_format format);