]> git.cworth.org Git - apitrace/commitdiff
Merge branch 'master' into d2d
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 4 Feb 2012 09:17:35 +0000 (09:17 +0000)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 4 Feb 2012 09:19:02 +0000 (09:19 +0000)
d3d8trace.py
d3d9imports.hpp
d3d9trace.py
specs/d3d9types.py
trace.py

index 1da3febebfe61c078ae56e534e7eeec01822c3ef..af87c2d2aa58bbae5ce8a00cc13be5bf66927e72 100644 (file)
@@ -40,6 +40,8 @@ class D3D8Tracer(DllTracer):
 
 
 if __name__ == '__main__':
+    print '#define INITGUID'
+    print
     print '#include <windows.h>'
     print '#include <d3d8.h>'
     print '#include "d3dshader.hpp"'
index e2e2015887a06394e34c7e9c36da8992b75be292..3e5ce39fbf1fbc453f40477b7589d745842d7fb2 100644 (file)
 #include <d3dx9.h>
 
 
+#ifndef D3DFMT_A2B10G10R10_XR_BIAS
+#define D3DFMT_A2B10G10R10_XR_BIAS 119
+#endif
+
 #ifndef D3DFMT_ATI1
 #define D3DFMT_ATI1 ((D3DFORMAT)MAKEFOURCC('A','T','I','1'))
 #endif
index ae4acd039fe39f2b274afdfa46f9f624f003611f..4f40194ec5af3a4841f4e21148fa5f494a3388ea 100644 (file)
@@ -70,6 +70,8 @@ class D3D9Tracer(DllTracer):
 
 
 if __name__ == '__main__':
+    print '#define INITGUID'
+    print
     print '#include "trace_writer_local.hpp"'
     print '#include "os.hpp"'
     print
index c5f0724d98c39efacf7bda2536f481c680afa6db..312eb2aaac63fa84160ddc8f10dfc05ebaea5d3f 100644 (file)
@@ -737,6 +737,7 @@ D3DFORMAT = Enum("D3DFORMAT", [
     "D3DFMT_A32B32G32R32F",
     "D3DFMT_CxV8U8",
     "D3DFMT_A1",
+    "D3DFMT_A2B10G10R10_XR_BIAS",
     "D3DFMT_BINARYBUFFER",
 
     # Unofficial formats
@@ -874,7 +875,7 @@ D3DLOCK = Flags(DWORD, [
 D3DVERTEXBUFFER_DESC = Struct("D3DVERTEXBUFFER_DESC", [
     (D3DFORMAT, "Format"),
     (D3DRESOURCETYPE, "Type"),
-    (DWORD, "Usage"),
+    (D3DUSAGE, "Usage"),
     (D3DPOOL, "Pool"),
     (UINT, "Size"),
     (DWORD, "FVF"),
@@ -883,7 +884,7 @@ D3DVERTEXBUFFER_DESC = Struct("D3DVERTEXBUFFER_DESC", [
 D3DINDEXBUFFER_DESC = Struct("D3DINDEXBUFFER_DESC", [
     (D3DFORMAT, "Format"),
     (D3DRESOURCETYPE, "Type"),
-    (DWORD, "Usage"),
+    (D3DUSAGE, "Usage"),
     (D3DPOOL, "Pool"),
     (UINT, "Size"),
 ])
@@ -891,7 +892,7 @@ D3DINDEXBUFFER_DESC = Struct("D3DINDEXBUFFER_DESC", [
 D3DSURFACE_DESC = Struct("D3DSURFACE_DESC", [
     (D3DFORMAT, "Format"),
     (D3DRESOURCETYPE, "Type"),
-    (DWORD, "Usage"),
+    (D3DUSAGE, "Usage"),
     (D3DPOOL, "Pool"),
     (D3DMULTISAMPLE_TYPE, "MultiSampleType"),
     (DWORD, "MultiSampleQuality"),
@@ -902,7 +903,7 @@ D3DSURFACE_DESC = Struct("D3DSURFACE_DESC", [
 D3DVOLUME_DESC = Struct("D3DVOLUME_DESC", [
     (D3DFORMAT, "Format"),
     (D3DRESOURCETYPE, "Type"),
-    (DWORD, "Usage"),
+    (D3DUSAGE, "Usage"),
     (D3DPOOL, "Pool"),
     (UINT, "Width"),
     (UINT, "Height"),
index 831af98640fb6970f143060fd430adf0939eee6d..bd977724484de670baffa9f5b2305531f4edc0f4 100644 (file)
--- a/trace.py
+++ b/trace.py
@@ -542,9 +542,11 @@ class Tracer:
     def wrapIid(self, riid, out):
             print '    if (%s && *%s) {' % (out.name, out.name)
             print '        if (*%s == m_pInstance) {' % (out.name,)
+            print '            AddRef();'
+            print '            m_pInstance->Release();'
             print '            *%s = this;' % (out.name,)
             print '        }'
-            for iface in self.api.interfaces:
+            for iface in self.api.getAllInterfaces():
                 print r'        else if (%s == IID_%s) {' % (riid.name, iface.name)
                 print r'            *%s = new Wrap%s((%s *) *%s);' % (out.name, iface.name, iface.name, out.name)
                 print r'        }'