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)
On Mon, May 30, 2011 at 12:42, Stefan Dösinger stefandoesinger@gmx.at wrote:
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 a similar vein, there's also + case WINED3DMULTISAMPLE_NONE: return D3DMULTISAMPLE_NONE; + case WINED3DMULTISAMPLE_NONMASKABLE: return (D3DMULTISAMPLE_TYPE) type;
Does this also need to be moved to device.c?
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)
I should probably better resubmit the whole modified series with a (try 2), right? Or only the modified ones, still using the original [foo/8] series?
Frédéric Delanoy
On Monday 30 May 2011 13:34:25 Frédéric Delanoy wrote:
In a similar vein, there's also
case WINED3DMULTISAMPLE_NONE: return D3DMULTISAMPLE_NONE;
case WINED3DMULTISAMPLE_NONMASKABLE: return (D3DMULTISAMPLE_TYPE)
type;
Does this also need to be moved to device.c?
Yes, to be on the safe side. The multisample type shouldn't be used in any performance-critical area.
I should probably better resubmit the whole modified series with a (try 2), right? Or only the modified ones, still using the original [foo/8] series?
I recommend to wait until Alexandre pushes the patches today and resubmit unapplied patches afterwards with (try 2) and a documentation what is different from the first version.