X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=wrappers%2Fd3d9trace.py;h=33f6e9d9dfbfa18b5fae730d31fb0552803925b6;hb=1f94577d8c4b1c1a2a1a8f3dceb0daac02dd72b7;hp=df39927f787a7854a233eb4689d9e39698aca4b7;hpb=82715be6c3d6bf058c9eca236bf30d26cc7fd22f;p=apitrace diff --git a/wrappers/d3d9trace.py b/wrappers/d3d9trace.py index df39927..33f6e9d 100644 --- a/wrappers/d3d9trace.py +++ b/wrappers/d3d9trace.py @@ -27,6 +27,8 @@ from dlltrace import DllTracer from specs.d3d9 import d3d9, D3DSHADER9 +import specs.d3d9dxva2 + class D3D9Tracer(DllTracer): @@ -53,6 +55,12 @@ class D3D9Tracer(DllTracer): return variables def implementWrapperInterfaceMethodBody(self, interface, base, method): + if method.name == 'DecodeExecute': + print r' _NumCompBuffers = pExecuteParams->NumCompBuffers;' + + if method.name == 'VideoProcessBlt': + print r' _NumSrcSurfaces = pData->NumSrcSurfaces;' + if method.name in ('Unlock', 'UnlockRect', 'UnlockBox'): print ' if (_LockedSize && m_pbData) {' self.emit_memcpy('(LPBYTE)m_pbData', '(LPBYTE)m_pbData', '_LockedSize') @@ -79,6 +87,7 @@ if __name__ == '__main__': print '#include "d3d9imports.hpp"' print '#include "d3d9size.hpp"' print '#include "d3d9shader.hpp"' + print '#include "dxvaint.h"' print print ''' static inline size_t @@ -90,6 +99,9 @@ _declCount(const D3DVERTEXELEMENT9 *pVertexElements) { } return count; } + +static UINT _NumCompBuffers = 0; /* XXX */ +static UINT _NumSrcSurfaces = 0; /* XXX */ ''' tracer = D3D9Tracer('d3d9.dll') tracer.traceApi(d3d9)