]> git.cworth.org Git - apitrace/blobdiff - helpers/d3dcommonsize.hpp
d3d9trace: Improve D3D9 shader size computation.
[apitrace] / 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;
         }
     }
 }