aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/mipmap.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-09-17 14:50:49 -0600
committerBrian Paul <[email protected]>2011-09-17 14:57:41 -0600
commit78026b8acef9d6eea4f37d9c5435447944d1befd (patch)
tree30aba1350b0a5f1fa93899aba95fcc764029ffe9 /src/mesa/main/mipmap.c
parente6cf338d015e994012535fce5e06c7dc59482b02 (diff)
mesa: use ctx->Driver.AllocTextureImageBuffer() to alloc texture memory
Diffstat (limited to 'src/mesa/main/mipmap.c')
-rw-r--r--src/mesa/main/mipmap.c16
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);