[7/8] d3d8: Use D3DRENDERSTATETYPE -> WINED3DRENDERSTATETYPE enum conversion function instead of implicit conversion (clang)

Stefan Dösinger stefandoesinger at gmx.at
Sun May 29 08:42:27 CDT 2011


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

>          default:
> -            hr = wined3d_device_set_render_state(This->wined3d_device,
> State, Value);
> +            hr =
> wined3d_device_set_render_state(This->wined3d_device, +                   
> wined3drenderstatetype_from_d3drenderstatetype(State), Value); }
>      wined3d_mutex_unlock();
d3d8's SetRenderState and GetRenderState already have a switch-case statement 
because ZBIAS doesn't exist in wined3d, so strictly speaking a direct cast is 
not possible. You cannot move the switch-case from SetRenderState to the state 
conversion function because the meaning of the Value parameter is different 
between D3DRS_ZBIAS and WINED3DRS_DEPTHBIAS. So I'd suggest to put the cast 
into the default cases of d3ddevice8::SetRenderState and 
d3device8::GetRenderState

In d3d9 you can cast between the d3d9 and wined3d render state types.
-------------- 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/20110529/9efb10d2/attachment.pgp>


More information about the wine-devel mailing list