[1/2] d3dx9_36: D3DXDeclaratorFromFVF returns D3DERR_INVALIDCALL when an invalid declarator is passed.
misha680
misha680 at gmail.com
Wed Sep 22 10:29:45 CDT 2010
Henri Verbeet wrote:
>
> That's insane. Any FVF validation should be done before starting the
> conversion, not afterwards by calling D3DXFVFFromDeclarator().
>
Thank you Henri for your wonderful feedback.
I was wondering if you had any particular suggestions as to the strategy for
verification of FVF validity.
Right now I am thinking of a simple mask based approach, e.g., extending:
d3d9types.h:#define D3DFVF_POSITION_MASK 0x400E
d3d9types.h:#define D3DFVF_TEXCOUNT_MASK 0x0f00
as well as other masks, and then doing a simple validation for flags that
may be outside this mask, such as:
d3dtypes.h:#define D3DFVF_TEXCOORDSIZE3(CoordIndex) (D3DFVF_TEXTUREFORMAT3
<< (CoordIndex*2 + 16))
d3dtypes.h:#define D3DFVF_TEXCOORDSIZE2(CoordIndex) (D3DFVF_TEXTUREFORMAT2)
d3dtypes.h:#define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4
<< (CoordIndex*2 + 16))
d3dtypes.h:#define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1
<< (CoordIndex*2 + 16))
If you have any other suggestions/comments please let me know. I will try to
take a look later today.
Thank you!
Yours
Misha
--
View this message in context: http://wine.1045685.n5.nabble.com/Re-1-2-d3dx9-36-D3DXDeclaratorFromFVF-returns-D3DERR-INVALIDCALL-when-an-invalid-declarator-is-passe-tp2849210p2849862.html
Sent from the Wine - Devel mailing list archive at Nabble.com.
More information about the wine-devel
mailing list