This patch adds conversion functions from WINED3DFMT_B8G8R8_UNORM, WINED3DFMT_B5G5R5A1_UNORM and WINED3DFMT_B5G5R5X1_UNORM to WINED3DFMT_DXT1. It uses code slighty modified from libtxc_dxtn. It fixes at least LEGO Stunt Rally, probably other games too. I didn't implement dxt3 and dxt5 since I haven't got any apps to test, but if someone has similar problems (black textures) with them and wants to test, let me know, and I will add them as well. I would also like some feedback about the patent situation, e.g. if the patch can be mainlined as it is or if it would be better to load libtxc_dxtn directly at runtime. Alberto