[Mesa-dev] [PATCH 2/4] st/mesa: implement AllocTextureImageBuffer() driver hook

Eric Anholt eric at anholt.net
Thu Sep 29 19:37:17 PDT 2011


On Thu, 29 Sep 2011 14:24:46 -0600, Brian Paul <brian.e.paul at gmail.com> wrote:
> From: Brian Paul <brianp at vmware.com>
> 
> This hasn't been needed so far since none of the core Mesa code paths
> that call ctx->Driver.AllocTextureImageBuffer() are used with the
> state tracker.  That will change in upcoming patches.
> Note that this function duplicates some code seen in the st_TexImage()
> function.  That can be cleaned up later.

I'll note that I found it useful within our driver to have
AllocTextureImageBuffer succeed even if there was data that hadn't been
Free()d.

If in general Alloc just freed existing memory (or reused it if it was
well-sized already), we wouldn't need to be so careful about
FreeTextureImageBuffer()ing in mipmap gen or teximage.  Just a thought.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110929/01a6a782/attachment.pgp>


More information about the mesa-dev mailing list