X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fstate_tracker%2Fst_format.h;h=7cddf5aa66a7c4fe5e0ea7a2ddb7a000cf627308;hb=273f4d6b5fe125bf0cba44c5ee8b25c76d3396c0;hp=3f5ac3201b1b2c35e73f245f2964592615df021b;hpb=704dca40c4e0e983c07d84c3a32f8f9dc78a5543;p=mesa.git diff --git a/src/mesa/state_tracker/st_format.h b/src/mesa/state_tracker/st_format.h index 3f5ac3201b1..7cddf5aa66a 100644 --- a/src/mesa/state_tracker/st_format.h +++ b/src/mesa/state_tracker/st_format.h @@ -29,11 +29,12 @@ #ifndef ST_FORMAT_H #define ST_FORMAT_H +#include "main/formats.h" struct pipe_format_info { enum pipe_format format; - GLenum base_format; + gl_format mesa_format; GLenum datatype; GLubyte red_bits; GLubyte green_bits; @@ -60,20 +61,28 @@ st_format_datatype(enum pipe_format format); extern enum pipe_format -st_mesa_format_to_pipe_format(GLuint mesaFormat); +st_mesa_format_to_pipe_format(gl_format mesaFormat); + +extern gl_format +st_pipe_format_to_mesa_format(enum pipe_format pipeFormat); extern enum pipe_format -st_choose_format(struct pipe_context *pipe, GLint internalFormat, +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_context *pipe, GLint internalFormat); +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 */