diff options
author | Brian Paul <[email protected]> | 2002-03-19 16:47:04 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2002-03-19 16:47:04 +0000 |
commit | aeb4434563c4014a662ea334878b60d3031bb3c1 (patch) | |
tree | c46189840da3ba9ba94cfcc5a99f4a6deccc582f /src/mesa/main/teximage.c | |
parent | d0570646bd67eae8152b63ccaf5c73970b1f56ea (diff) |
Use MESA_PBUFFER_ALLOC/FREE macros to allocate all framebuffer and texture
memory. These can be overridden by applications which need to manage this
memory specially. Contributed by Gerk Huisma.
Also, new code for 8-bit -> 16-bit/channel texture image storage which
fills in the least-significant bits properly.
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 89cf12c8d08..e383cbdfc96 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1,10 +1,10 @@ -/* $Id: teximage.c,v 1.106 2001/11/18 22:48:13 brianp Exp $ */ +/* $Id: teximage.c,v 1.107 2002/03/19 16:47:05 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -382,7 +382,7 @@ void _mesa_free_texture_image( struct gl_texture_image *teximage ) { if (teximage->Data) { - FREE( teximage->Data ); + MESA_PBUFFER_FREE( teximage->Data ); teximage->Data = NULL; } FREE( teximage ); @@ -1350,7 +1350,7 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat, } else if (texImage->Data) { /* free the old texture data */ - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } clear_teximage_fields(texImage); /* not really needed, but helpful */ @@ -1475,7 +1475,7 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat, } else if (texImage->Data) { /* free the old texture data */ - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } clear_teximage_fields(texImage); /* not really needed, but helpful */ @@ -1596,7 +1596,7 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat, } } else if (texImage->Data) { - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } clear_teximage_fields(texImage); /* not really needed, but helpful */ @@ -1866,7 +1866,7 @@ _mesa_CopyTexImage1D( GLenum target, GLint level, } else if (texImage->Data) { /* free the old texture data */ - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } @@ -1930,7 +1930,7 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat, } else if (texImage->Data) { /* free the old texture data */ - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } @@ -2115,7 +2115,7 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level, } } else if (texImage->Data) { - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } @@ -2214,7 +2214,7 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level, } } else if (texImage->Data) { - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } @@ -2312,7 +2312,7 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level, } } else if (texImage->Data) { - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } |