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

2012-06-11 Thread Brian Paul
On 06/10/2012 11:42 PM, Eric Anholt wrote: On Fri, 8 Jun 2012 14:31:52 -0600, Brian Paul 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

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

2012-06-10 Thread Eric Anholt
On Fri, 8 Jun 2012 14:31:52 -0600, Brian Paul 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

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

2012-06-08 Thread Brian Paul
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 TexSu