diff options
author | Adam Jackson <[email protected]> | 2006-04-03 21:28:07 +0000 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2006-04-03 21:28:07 +0000 |
commit | 76a0797c3263edf319e8c98b04b8ef52aeed7380 (patch) | |
tree | 11b5f51651759f9c6ce2111cac4e8e5f9432f418 /src/mesa/drivers/dri/tdfx | |
parent | a9cc078b0e4340d36da2fdef08d45987f8e67145 (diff) |
Bug #5754: Allocate texture memory correctly. (Richard Drummond)
Diffstat (limited to 'src/mesa/drivers/dri/tdfx')
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_tex.c | 7 |
1 files 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; |