st/mesa: try to find the format matching format+type in decompressed_with_blit
authorMarek Olšák <maraeo@gmail.com>
Thu, 20 Dec 2012 01:09:56 +0000 (02:09 +0100)
committerMarek Olšák <maraeo@gmail.com>
Fri, 4 Jan 2013 13:06:09 +0000 (14:06 +0100)
commit5daba187c987b1fe607d395c70748c6e331f59c4
tree32fbca8988409df33b86d3d8f084474a125abc96
parent0aecb174ce5d2d5c25e1076e8d0cdcb68e9a3b5c
st/mesa: try to find the format matching format+type in decompressed_with_blit

There was the fast path based on _mesa_format_matches_format_and_type
for GetTexImage, but it never worked, because the Mesa format we were testing
there was always compressed. Further testing showed that the fast path
had been completely broken.

In this commit, the somewhat limited helper util_create_rgba_texture is
no longer used and instead, custom code for the texture creation is added,
which tries to find the best matching RGBA8 format, so that we can hit
the fast path *always* if the read format is a variant of RGBA8 and supported
by the driver.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_cb_texture.c