mesa: Track maximum CurrentTexUnit to reduce glDeleteTextures() overhead.
authorEric Anholt <eric@anholt.net>
Fri, 25 Apr 2014 22:57:21 +0000 (15:57 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 30 Apr 2014 21:33:21 +0000 (14:33 -0700)
commit973345fc2389e7f74b8732052e781672c4e135c2
treeb5b8924ae645de38976aed40da84e2b7684ea84b
parent6a97deb88aa715af9760cf3c7ca0c1ff76e4f325
mesa: Track maximum CurrentTexUnit to reduce glDeleteTextures() overhead.

No more walking 96*6 pointers looking to see if they're the current
texture, when we only use the first 2 out of 96 units.  -6.26002% +/-
1.87817% effect on cairo runtime on no-fbo-cache glamor (n=36).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/mtypes.h
src/mesa/main/texobj.c
src/mesa/main/texstate.c