[4/7] WineD3D: Macroize CheckDeviceFormat to reduce code duplication

Roderick Colenbrander thunderbird2k at gmx.net
Thu Apr 3 08:50:43 CDT 2008


In the end I think something like this is nice to do but not right now. CheckDeviceFormat has changed a lot and it is in good shape now but CreateTexture and friends don't do anything with the capabilities we report. In other words the next step should be to move flags (where possible) over to the pixel format table. E.g. in case of render targets and post pixel shader blending this has been done already. It can be done for a few more.

Basically the Check*Capability functions somehow be placed in utils.c and the result would be cached in the pixel format table. Both CheckDeviceFormat and CreateTexture (and friends) would be able to use the information then.

The Check*Capability calls in CheckDeviceFormat would then become AND-mask checks on the Flags field of a pixel format. This can all be done in small patches.

Roderick


> The main idea is to avoid that we have screen-sized code sections in this 
> function that look exactly the same. This should make navigation in the
> code 
> easier
> 
> Roderick: If you do not like that, just drop a note

-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser



More information about the wine-patches mailing list