#ifndef MIPMAP_H
#define MIPMAP_H
-#include "mtypes.h"
+#include "glheader.h"
+struct gl_context;
+struct gl_texture_object;
+
+unsigned
+_mesa_compute_num_levels(struct gl_context *ctx,
+ struct gl_texture_object *texObj,
+ GLenum target);
extern void
_mesa_generate_mipmap_level(GLenum target,
GLubyte **dstData,
GLint dstRowStride);
-
-extern GLboolean
-_mesa_prepare_mipmap_level(struct gl_context *ctx,
- struct gl_texture_object *texObj, GLuint level,
- GLsizei width, GLsizei height, GLsizei depth,
- GLsizei border, GLenum intFormat, gl_format format);
+void
+_mesa_prepare_mipmap_levels(struct gl_context *ctx,
+ struct gl_texture_object *texObj,
+ unsigned baseLevel, unsigned maxLevel);
extern void
_mesa_generate_mipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj);
+extern GLboolean
+_mesa_next_mipmap_level_size(GLenum target, GLint border,
+ GLint srcWidth, GLint srcHeight, GLint srcDepth,
+ GLint *dstWidth, GLint *dstHeight, GLint *dstDepth);
#endif /* MIPMAP_H */