aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/mipmap.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-19 13:23:24 +0200
committermarha <marha@users.sourceforge.net>2011-09-19 13:23:24 +0200
commitb2c925e360e2c366526de15b44603f855f94139c (patch)
tree2a963073645913b7c6d43fa04dc0aa13bda57b80 /mesalib/src/mesa/main/mipmap.c
parent18ae1470a8dbcfe369ddf0d7e17e0ea665251ccd (diff)
downloadvcxsrv-b2c925e360e2c366526de15b44603f855f94139c.tar.gz
vcxsrv-b2c925e360e2c366526de15b44603f855f94139c.tar.bz2
vcxsrv-b2c925e360e2c366526de15b44603f855f94139c.zip
xtrans libX11 libXext libXdmcp libXau libXft libXinerama libXmu libfontenc
mesa git update 19 sept 2011
Diffstat (limited to 'mesalib/src/mesa/main/mipmap.c')
-rw-r--r--mesalib/src/mesa/main/mipmap.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/mesalib/src/mesa/main/mipmap.c b/mesalib/src/mesa/main/mipmap.c
index 869243d1c..f170d235a 100644
--- a/mesalib/src/mesa/main/mipmap.c
+++ b/mesalib/src/mesa/main/mipmap.c
@@ -1955,23 +1955,17 @@ generate_mipmap_uncompressed(struct gl_context *ctx, GLenum target,
dstDepth, border, srcImage->InternalFormat,
srcImage->TexFormat);
dstImage->DriverData = NULL;
- dstImage->FetchTexelc = srcImage->FetchTexelc;
- dstImage->FetchTexelf = srcImage->FetchTexelf;
- /* Alloc new teximage data buffer */
- {
- GLuint size = _mesa_format_image_size(dstImage->TexFormat,
- dstWidth, dstHeight, dstDepth);
- dstImage->Data = _mesa_alloc_texmemory(size);
- if (!dstImage->Data) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps");
- return;
- }
+ /* Alloc storage for new texture image */
+ if (!ctx->Driver.AllocTextureImageBuffer(ctx, dstImage,
+ dstImage->TexFormat,
+ dstWidth, dstHeight,
+ dstDepth)) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps");
+ return;
}
ASSERT(dstImage->TexFormat);
- ASSERT(dstImage->FetchTexelc);
- ASSERT(dstImage->FetchTexelf);
_mesa_generate_mipmap_level(target, datatype, comps, border,
srcWidth, srcHeight, srcDepth,