gallium: make choose_format() non-static: st_choose_format()
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 16 Apr 2008 15:45:56 +0000 (09:45 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 16 Apr 2008 22:53:43 +0000 (16:53 -0600)
src/mesa/state_tracker/st_format.c
src/mesa/state_tracker/st_format.h

index cd41dc4684dc6623d567d8b9dca875f6ba08cc6b..3d15a03cab6d1dc57fac857857bd7c8da8b64924 100644 (file)
@@ -354,8 +354,9 @@ default_depth_format(struct pipe_screen *screen, uint type)
  * Given an OpenGL internalFormat value for a texture or surface, return
  * the best matching PIPE_FORMAT_x, or PIPE_FORMAT_NONE if there's no match.
  */
-static enum pipe_format
-choose_format(struct pipe_context *pipe, GLint internalFormat, uint surfType)
+enum pipe_format
+st_choose_format(struct pipe_context *pipe, GLint internalFormat,
+                 uint surfType)
 {
    struct pipe_screen *screen = pipe->screen;
 
@@ -530,7 +531,7 @@ choose_format(struct pipe_context *pipe, GLint internalFormat, uint surfType)
 enum pipe_format
 st_choose_renderbuffer_format(struct pipe_context *pipe, GLint internalFormat)
 {
-   return choose_format(pipe, internalFormat, PIPE_SURFACE);
+   return st_choose_format(pipe, internalFormat, PIPE_SURFACE);
 }
 
 
@@ -594,7 +595,7 @@ st_ChooseTextureFormat(GLcontext *ctx, GLint internalFormat,
    (void) format;
    (void) type;
 
-   pFormat = choose_format(ctx->st->pipe, internalFormat, PIPE_TEXTURE);
+   pFormat = st_choose_format(ctx->st->pipe, internalFormat, PIPE_TEXTURE);
    if (pFormat == PIPE_FORMAT_NONE)
       return NULL;
 
index c9a11de50434ab3aff06a637b87cc887f6171c00..ff0fd042dbab3545fa971d76ee3a7a7dc1efcf11 100644 (file)
@@ -63,6 +63,10 @@ extern enum pipe_format
 st_mesa_format_to_pipe_format(GLuint mesaFormat);
 
 
+extern enum pipe_format
+st_choose_format(struct pipe_context *pipe, GLint internalFormat,
+                 uint surfType);
+
 extern enum pipe_format
 st_choose_renderbuffer_format(struct pipe_context *pipe, GLint internalFormat);