[Mesa-dev] [PATCH] mesa: implement glTexImage as glTexSubImage when possible

Eric Anholt eric at anholt.net
Mon Jun 11 07:42:27 CEST 2012


On Fri,  8 Jun 2012 14:31:52 -0600, Brian Paul <brianp at vmware.com> wrote:
> I've now seen a couple apps that replace a whole texture image with a
> glTexImage() call instead of glTexSubImage().  The later is better
> because we can skip freeing/allocating texture memory.
> 
> This patch checks if the new glTexImage's format and size matches the
> current image.  If so, use the TexSubImage path.

This only makes sense if drivers consistently do blit uploads for
texsubimage -- otherwise, teximage (which does) is better.  Right now
i965 only manages to do so for non-depth, GL_TEXTURE_2D textures,
pre-gen6.  Hopefully that will get fixed now that we've got the 3d blit
code, so that wouldn't block this patch for us.

For hardware drivers, I expect this to be no change or a loss, though.
Do you have any numbers for any driver, including software?
-------------- 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/20120610/5b4d983f/attachment.pgp>


More information about the mesa-dev mailing list