OSDN Git Service

added st_sizeof_format()
authorBrian <brian.paul@tungstengraphics.com>
Fri, 10 Aug 2007 19:11:31 +0000 (13:11 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Fri, 10 Aug 2007 19:11:31 +0000 (13:11 -0600)
src/mesa/state_tracker/st_format.c
src/mesa/state_tracker/st_format.h

index 4aa5066..a89dfb1 100644 (file)
@@ -99,6 +99,15 @@ st_get_format_info(GLuint format)
 
 
 GLuint
+st_sizeof_format(GLuint pipeFormat)
+{
+   const struct pipe_format_info *info = st_get_format_info(pipeFormat);
+   assert(info);
+   return info->size;
+}
+
+
+GLuint
 st_mesa_format_to_pipe_format(GLuint mesaFormat)
 {
    switch (mesaFormat) {
index dde4731..6b3cba0 100644 (file)
@@ -51,6 +51,10 @@ st_get_format_info(GLuint format);
 
 
 extern GLuint
+st_sizeof_format(GLuint pipeFormat);
+
+
+extern GLuint
 st_mesa_format_to_pipe_format(GLuint mesaFormat);