st/mesa: Remove unnecessary header from st_cb_drawpixels.c.
[mesa.git] / src / mesa / state_tracker / st_format.h
index 23abc36edff7ba203fe5b57dccf904323e00190a..7cddf5aa66a7c4fe5e0ea7a2ddb7a000cf627308 100644 (file)
  **************************************************************************/
 
 
-#ifndef ST_CB_TEXIMAGE_H
-#define ST_CB_TEXIMAGE_H
+#ifndef ST_FORMAT_H
+#define ST_FORMAT_H
 
+#include "main/formats.h"
 
 struct pipe_format_info
 {
-   GLuint format;
-   GLenum base_format;
+   enum pipe_format format;
+   gl_format mesa_format;
    GLenum datatype;
    GLubyte red_bits;
    GLubyte green_bits;
@@ -47,32 +48,41 @@ struct pipe_format_info
 };
 
 
-extern GLboolean
-st_get_format_info(
-   GLuint format,
-   struct pipe_format_info *pinfo );
+GLboolean
+st_get_format_info(enum pipe_format format, struct pipe_format_info *pinfo);
 
 
 extern GLuint
-st_sizeof_format(GLuint pipeFormat);
+st_sizeof_format(enum pipe_format format);
 
 
 extern GLenum
-st_format_datatype(GLuint pipeFormat);
+st_format_datatype(enum pipe_format format);
 
 
-extern GLuint
-st_mesa_format_to_pipe_format(GLuint mesaFormat);
+extern enum pipe_format
+st_mesa_format_to_pipe_format(gl_format mesaFormat);
 
+extern gl_format
+st_pipe_format_to_mesa_format(enum pipe_format pipeFormat);
 
-extern GLuint
-st_choose_pipe_format(struct pipe_context *pipe, GLint internalFormat,
-                      GLenum format, GLenum type);
 
+extern enum pipe_format
+st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
+                 enum pipe_texture_target target, unsigned tex_usage);
+
+extern enum pipe_format
+st_choose_renderbuffer_format(struct pipe_screen *screen,
+                              GLenum internalFormat);
 
-extern const struct gl_texture_format *
+
+extern gl_format
 st_ChooseTextureFormat(GLcontext * ctx, GLint internalFormat,
                        GLenum format, GLenum type);
 
 
+extern GLboolean
+st_equal_formats(enum pipe_format pFormat, GLenum format, GLenum type);
+
+
 #endif /* ST_CB_TEXIMAGE_H */