]> git.cworth.org Git - apitrace/blobdiff - d3d9trace.py
Add a top-level apitrace program.
[apitrace] / d3d9trace.py
index 5b83c03837bccb07cf8fa3927f7a516af22f94c2..e6bf0001b6b70db15784135f5d33301fe3fb54cd 100644 (file)
@@ -46,6 +46,17 @@ if __name__ == '__main__':
     print '#include "d3d9imports.hpp"'
     print '#include "d3dshader.hpp"'
     print
+    print '''
+static inline size_t
+_declCount(const D3DVERTEXELEMENT9 *pVertexElements) {
+    size_t count = 0;
+    if (pVertexElements) {
+        while (pVertexElements[count++].Stream != 0xff)
+            ;
+    }
+    return count;
+}
+'''
     tracer = D3D9Tracer('d3d9.dll')
     tracer.trace_api(d3d9)