Stefan Dösinger : wined3d: Fix the texcoord size mask.

Alexandre Julliard julliard at winehq.org
Tue Aug 26 07:06:42 CDT 2008


Module: wine
Branch: master
Commit: e8b9f167d678ab76bd812184e9cc4c96ff322a78
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e8b9f167d678ab76bd812184e9cc4c96ff322a78

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Wed Aug 20 10:51:45 2008 -0500

wined3d: Fix the texcoord size mask.

There is room for 8 texture coordinates, not just 4.

---

 dlls/d3d9/vertexdeclaration.c |    2 +-
 dlls/wined3d/device.c         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d9/vertexdeclaration.c b/dlls/d3d9/vertexdeclaration.c
index d38baaa..327c741 100644
--- a/dlls/d3d9/vertexdeclaration.c
+++ b/dlls/d3d9/vertexdeclaration.c
@@ -71,7 +71,7 @@ HRESULT vdecl_convert_fvf(
     BOOL has_specular = (fvf & D3DFVF_SPECULAR) !=0;
 
     DWORD num_textures = (fvf & D3DFVF_TEXCOUNT_MASK) >> D3DFVF_TEXCOUNT_SHIFT;
-    DWORD texcoords = (fvf & 0x00FF0000) >> 16;
+    DWORD texcoords = (fvf & 0xFFFF0000) >> 16;
 
     D3DVERTEXELEMENT9 end_element = D3DDECL_END();
     D3DVERTEXELEMENT9 *elements = NULL;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 350c6d5..4ff206d 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1735,7 +1735,7 @@ static unsigned int ConvertFvfToDeclaration(IWineD3DDeviceImpl *This, /* For the
     BOOL has_specular = (fvf & WINED3DFVF_SPECULAR) !=0;
 
     DWORD num_textures = (fvf & WINED3DFVF_TEXCOUNT_MASK) >> WINED3DFVF_TEXCOUNT_SHIFT;
-    DWORD texcoords = (fvf & 0x00FF0000) >> 16;
+    DWORD texcoords = (fvf & 0xFFFF0000) >> 16;
 
     WINED3DVERTEXELEMENT end_element = WINED3DDECL_END();
     WINED3DVERTEXELEMENT *elements = NULL;




More information about the wine-cvs mailing list