aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/mipmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/mipmap.c')
-rw-r--r--mesalib/src/mesa/main/mipmap.c40
1 files changed, 3 insertions, 37 deletions
diff --git a/mesalib/src/mesa/main/mipmap.c b/mesalib/src/mesa/main/mipmap.c
index f170d235a..1ead5ee10 100644
--- a/mesalib/src/mesa/main/mipmap.c
+++ b/mesalib/src/mesa/main/mipmap.c
@@ -1986,7 +1986,7 @@ generate_mipmap_compressed(struct gl_context *ctx, GLenum target,
gl_format temp_format;
GLint components;
GLuint temp_src_stride, temp_dst_stride; /* in bytes */
- GLchan *temp_src = NULL, *temp_dst = NULL;
+ GLubyte *temp_src = NULL, *temp_dst = NULL;
GLenum temp_datatype;
GLenum temp_base_format;
@@ -2101,7 +2101,7 @@ generate_mipmap_compressed(struct gl_context *ctx, GLenum target,
/* swap src and dest pointers */
{
- GLchan *temp = temp_src;
+ GLubyte *temp = temp_src;
temp_src = temp_dst;
temp_dst = temp;
@@ -2109,7 +2109,7 @@ generate_mipmap_compressed(struct gl_context *ctx, GLenum target,
}
} /* loop over mipmap levels */
- free((void *) temp_src);
+ free(temp_src);
free(temp_dst);
}
@@ -2218,37 +2218,3 @@ do { \
}
}
-
-/**
- * Upscale an image by replication, not (typical) stretching.
- * We use this when the image width or height is less than a
- * certain size (4, 8) and we need to upscale an image.
- */
-void
-_mesa_upscale_teximage2d(GLsizei inWidth, GLsizei inHeight,
- GLsizei outWidth, GLsizei outHeight,
- GLint comps, const GLchan *src, GLint srcRowStride,
- GLchan *dest )
-{
- GLint i, j, k;
-
- ASSERT(outWidth >= inWidth);
- ASSERT(outHeight >= inHeight);
-#if 0
- ASSERT(inWidth == 1 || inWidth == 2 || inHeight == 1 || inHeight == 2);
- ASSERT((outWidth & 3) == 0);
- ASSERT((outHeight & 3) == 0);
-#endif
-
- for (i = 0; i < outHeight; i++) {
- const GLint ii = i % inHeight;
- for (j = 0; j < outWidth; j++) {
- const GLint jj = j % inWidth;
- for (k = 0; k < comps; k++) {
- dest[(i * outWidth + j) * comps + k]
- = src[ii * srcRowStride + jj * comps + k];
- }
- }
- }
-}
-