=?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: d3dx9: Fix RegisterCount calculation.

Alexandre Julliard julliard at winehq.org
Mon Aug 27 14:35:02 CDT 2012


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

Author: Rico Schüller <kgbricola at web.de>
Date:   Sat Aug 25 16:28:34 2012 +0200

d3dx9: Fix RegisterCount calculation.

---

 dlls/d3dx9_36/shader.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
index e30292f..162909b 100644
--- a/dlls/d3dx9_36/shader.c
+++ b/dlls/d3dx9_36/shader.c
@@ -1616,8 +1616,6 @@ static HRESULT parse_ctab_constant_type(const char *ctab, DWORD typeoffset, stru
 
     if (count)
     {
-        WORD size_element = 0;
-
         constant->constants = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*constant->constants) * count);
         if (!constant->constants)
         {
@@ -1634,8 +1632,7 @@ static HRESULT parse_ctab_constant_type(const char *ctab, DWORD typeoffset, stru
             if (hr != D3D_OK)
                 goto error;
 
-            if (i == 0) size_element = constant->constants[i].desc.RegisterCount;
-            size += size_element;
+            size += constant->constants[i].desc.RegisterCount;
         }
     }
     else




More information about the wine-cvs mailing list