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 4aa5066b8cbff0bb0a2ea99b770f224eb86021b6..a89dfb10fb4c266da3b25c4818520a72bfba29b5 100644 (file)
@@ -98,6 +98,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)
 {
index dde4731e94d4f3f343579f30d9312831c6cd15bb..6b3cba0f631929bfbdf61d263a14eeca7256ffbb 100644 (file)
@@ -50,6 +50,10 @@ extern const struct pipe_format_info *
 st_get_format_info(GLuint format);
 
 
+extern GLuint
+st_sizeof_format(GLuint pipeFormat);
+
+
 extern GLuint
 st_mesa_format_to_pipe_format(GLuint mesaFormat);