diff options
Diffstat (limited to 'src/mesa/main/mipmap.c')
-rw-r--r-- | src/mesa/main/mipmap.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 6dfa423f123..f170d235a2e 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -1956,15 +1956,13 @@ generate_mipmap_uncompressed(struct gl_context *ctx, GLenum target, srcImage->TexFormat); dstImage->DriverData = NULL; - /* 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); |