]> git.cworth.org Git - apitrace/commitdiff
d3d9trace: Improve D3D9 shader size computation.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 26 Jun 2013 20:13:13 +0000 (21:13 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 26 Jun 2013 20:13:13 +0000 (21:13 +0100)
Still not bullet proof, but better than before.

helpers/d3dcommonsize.hpp

index 0b45086356043fccb023930bdbd538dbd7ce2fa4..6619b13a683cefa0f3be96d898971d289b66d10e 100644 (file)
@@ -106,10 +106,10 @@ _shaderSize(const DWORD *pFunction)
             break;
 
         case D3DSIO_END:
-            if (dwToken != D3DSIO_END) {
-                os::log("apitrace: warning: %s: malformed END token\n", __FUNCTION__);
+            if (dwToken == D3DSIO_END) {
+                return dwLength * sizeof *pFunction;
             }
-            return dwLength * sizeof *pFunction;
+            break;
         }
     }
 }