st/mesa: improve the guess_and_alloc_texture() heuristic
authorBrian Paul <brianp@vmware.com>
Fri, 19 Oct 2012 00:00:50 +0000 (18:00 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 19 Oct 2012 00:00:50 +0000 (18:00 -0600)
commit6551c4ea3cc21169696920c5f3d3fb0bb8d6e939
treebd84d99fa20c24e72d36051bac304d8fcd8f9547
parente5a9bf55231aa14f6ae831a5c47d7176cb6c230b
st/mesa: improve the guess_and_alloc_texture() heuristic

If GL_BASE_LEVEL==0 and GL_MAX_LEVEL==0 that's a pretty good hint that
there'll be a single mipmap level in the texture.

Google Earth sets the texture's state this way before the first glTexImage
call.  This saves a bit of texture memory.
src/mesa/state_tracker/st_cb_texture.c