[3/8] d3d8: Use D3DRESOURCETYPE -> WINED3DRESOURCETYPE enum conversion function instead of implicit conversion (clang)

Stefan Dösinger stefandoesinger at gmx.at
Mon May 30 05:42:04 CDT 2011


On Sunday 29 May 2011 09:46:06 Frédéric Delanoy wrote:

> +static inline D3DRESOURCETYPE
> d3dresourcetype_from_wined3dresourcetype(WINED3DRESOURCETYPE type) +{
> ...
> +        case WINED3DRTYPE_BUFFER: return D3DRTYPE_VERTEXBUFFER;
> ...
> +static inline WINED3DRESOURCETYPE
> wined3dresourcetype_from_d3dresourcetype(D3DRESOURCETYPE type) +{
> +        case D3DRTYPE_VERTEXBUFFER: return WINED3DRTYPE_BUFFER;
> +        case D3DRTYPE_INDEXBUFFER: return (WINED3DRESOURCETYPE) type;

Those two cases are worth printing a FIXME. Just move the implementation to 
device.c (like d3dformat_from_wined3dformat) so you have a declared debug 
channel.

In the long run the resource type conversion should go away in almost all 
places, and those places that still need it(like CheckDeviceFormat) have to do 
the conversion on their own.

(Sorry that I didn't send that with the feedback for patch 7, it took me a 
while to get around to reading it)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20110530/166e2c9f/attachment.pgp>


More information about the wine-devel mailing list