[PATCH] WineD3D: Fix the texcoord size mask=0A=

Stefan Doesinger stefan at codeweavers.com
Wed Aug 20 10:51:45 CDT 2008


=0A=
There is room for 8 texture coordinates, not just 4=0A=
Note that the d3d9 version of this routine converts the FVF into a=0A=
d3d9 declaration, while the wined3d version creates a wined3d=0A=
declaration. So the code is similar, but not identical=0A=
---=0A=
 dlls/d3d9/vertexdeclaration.c |    2 +-=0A=
 dlls/wined3d/device.c         |    2 +-=0A=
 2 files changed, 2 insertions(+), 2 deletions(-)=0A=
=0A=
diff --git a/dlls/d3d9/vertexdeclaration.c =
b/dlls/d3d9/vertexdeclaration.c=0A=
index d38baaa..327c741 100644=0A=
--- a/dlls/d3d9/vertexdeclaration.c=0A=
+++ b/dlls/d3d9/vertexdeclaration.c=0A=
@@ -71,7 +71,7 @@ HRESULT vdecl_convert_fvf(=0A=
     BOOL has_specular =3D (fvf & D3DFVF_SPECULAR) !=3D0;=0A=
 =0A=
     DWORD num_textures =3D (fvf & D3DFVF_TEXCOUNT_MASK) >> =
D3DFVF_TEXCOUNT_SHIFT;=0A=
-    DWORD texcoords =3D (fvf & 0x00FF0000) >> 16;=0A=
+    DWORD texcoords =3D (fvf & 0xFFFF0000) >> 16;=0A=
 =0A=
     D3DVERTEXELEMENT9 end_element =3D D3DDECL_END();=0A=
     D3DVERTEXELEMENT9 *elements =3D NULL;=0A=
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c=0A=
index 350c6d5..4ff206d 100644=0A=
--- a/dlls/wined3d/device.c=0A=
+++ b/dlls/wined3d/device.c=0A=
@@ -1735,7 +1735,7 @@ static unsigned int =
ConvertFvfToDeclaration(IWineD3DDeviceImpl *This, /* For the=0A=
     BOOL has_specular =3D (fvf & WINED3DFVF_SPECULAR) !=3D0;=0A=
 =0A=
     DWORD num_textures =3D (fvf & WINED3DFVF_TEXCOUNT_MASK) >> =
WINED3DFVF_TEXCOUNT_SHIFT;=0A=
-    DWORD texcoords =3D (fvf & 0x00FF0000) >> 16;=0A=
+    DWORD texcoords =3D (fvf & 0xFFFF0000) >> 16;=0A=
 =0A=
     WINED3DVERTEXELEMENT end_element =3D WINED3DDECL_END();=0A=
     WINED3DVERTEXELEMENT *elements =3D NULL;=0A=
-- =0A=
1.5.6.4=0A=
=0A=

------=_NextPart_000_0027_01C90695.B7FF37A0--




More information about the wine-patches mailing list