[PATCH] D3DXGetFVFVertexSize implementation

Stefan Dösinger stefan at codeweavers.com
Fri Jan 25 15:33:14 CST 2008

Am Freitag, 25. Januar 2008 19:41:52 schrieb Victor:
> This is a DX8 implementation of D3DXGetFVFVertexSize (i.e. D3DFVF_XYZW is
> commented out).I must note that I've encountered a bug in original/natvie
> D3DXGetFVFVertexSize - it returned wrong vertex size(one float less than
> needed(?)) when it was used with D3DFVF_XYZB4.It was more than a year ago,
> and I'm not sure if this bug still exists in native D3DX.
> Anyway this bug isn't reproduced here.
A few comments:

Regarding the possible bug in d3dx8 I recommend to add a test for this, like 
you're testing other flags already in dlls/d3dx8/tests/math.c . This will 
shed more light on the issue. If you do not have a Windows box to test on I 
can run the test for you. If the bug still exists Wine should clone it as 
well. (I don't think this function belongs to math.c by the way, probably 
create a new file called vertex.c or fvf.c or something like that)

Your code contains some C++ comments ("//"), please do not use them as Wine is 
plain C code. I think you can just remove the D3DFVF_XYZW block if this 
enumeration doesn't exist in d3d8.

Also please watch out with the whitespaces: The code is mixing tabs and 
spaces. Preferably stick to the style that is used in the rest of the file.

More information about the wine-devel mailing list