Fix texture format selection. ChooseTextureFormat is supposed to select the
authorIan Romanick <idr@us.ibm.com>
Thu, 25 Aug 2005 19:15:01 +0000 (19:15 +0000)
committerIan Romanick <idr@us.ibm.com>
Thu, 25 Aug 2005 19:15:01 +0000 (19:15 +0000)
commit8bc0b3f9611f9634d497fe2174246e866920f865
tree78f720d0abaf3733d0dafa8e0bd1f0ee69d853f9
parent8de9d92acf3e2ec76245c34d90fac65c7bb1994c
Fix texture format selection.  ChooseTextureFormat is supposed to select the
hardware format of the texture, and SetTexImages is supposed to use the
format selected by ChooseTextureFormat.  However, both routines were making
their choices based on the texture's BaseFormat.  This is wrong.
ChooseTextureFormat uses BaseFormat and SetTexImages uses
TexFormat->MesaFormat.

Once SetTexImages was fixed to use the right format values,
ChooseTextureFormat was cleaned up.  It now uses the few available texture
formats supported by the i810 in a smarter way.  This should improve the
quality of LUMINANCE, LUMINANCE_ALPHA, and INTENSITY textures.

I tested this by cycling through all the texture formats in demos/texenv and
tests/yuvsquare.
src/mesa/drivers/dri/i810/i810tex.c
src/mesa/drivers/dri/i810/i810texstate.c