From 76a0797c3263edf319e8c98b04b8ef52aeed7380 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 3 Apr 2006 21:28:07 +0000 Subject: [PATCH] Bug #5754: Allocate texture memory correctly. (Richard Drummond) --- src/mesa/drivers/dri/tdfx/tdfx_tex.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tex.c b/src/mesa/drivers/dri/tdfx/tdfx_tex.c index f293c3f2f82..fe40953a1b3 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_tex.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_tex.c @@ -1357,10 +1357,11 @@ tdfxTexImage2D(GLcontext *ctx, GLenum target, GLint level, 1, internalFormat); dstRowStride = _mesa_compressed_row_stride(internalFormat, mml->width); - texImage->Data = _mesa_malloc(texImage->CompressedSize); + texImage->Data = _mesa_alloc_texmemory(texImage->CompressedSize); } else { dstRowStride = mml->width * texelBytes; - texImage->Data = _mesa_malloc(mml->width * mml->height * texelBytes); + texImage->Data = _mesa_alloc_texmemory(mml->width * mml->height * + texelBytes); } if (!texImage->Data) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); @@ -1663,7 +1664,7 @@ tdfxCompressedTexImage2D (GLcontext *ctx, GLenum target, mml->height, 1, internalFormat); - texImage->Data = _mesa_malloc(texImage->CompressedSize); + texImage->Data = _mesa_alloc_texmemory(texImage->CompressedSize); if (!texImage->Data) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2D"); return; -- 2.30.2