OSDN Git Service

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

index 4f36c84..4aa5066 100644 (file)
@@ -98,6 +98,20 @@ st_get_format_info(GLuint format)
 }
 
 
+GLuint
+st_mesa_format_to_pipe_format(GLuint mesaFormat)
+{
+   switch (mesaFormat) {
+      /* fix this */
+   case MESA_FORMAT_ARGB8888_REV:
+   case MESA_FORMAT_ARGB8888:
+      return PIPE_FORMAT_U_A8_R8_G8_B8;
+   default:
+      assert(0);
+      return 0;
+   }
+}
+
 
 /**
  * Search list of formats for first RGBA format.
index 452ae59..dde4731 100644 (file)
@@ -51,6 +51,10 @@ st_get_format_info(GLuint format);
 
 
 extern GLuint
+st_mesa_format_to_pipe_format(GLuint mesaFormat);
+
+
+extern GLuint
 st_choose_pipe_format(struct pipe_context *pipe, GLint internalFormat,
                       GLenum format, GLenum type);