Method(HRESULT, "GetDisplayMode", [Out(Pointer(D3DDISPLAYMODE), "pMode")]),
Method(HRESULT, "GetCreationParameters", [Out(Pointer(D3DDEVICE_CREATION_PARAMETERS), "pParameters")]),
Method(HRESULT, "SetCursorProperties", [(UINT, "XHotSpot"), (UINT, "YHotSpot"), (PDIRECT3DSURFACE8, "pCursorBitmap")]),
+ # XXX: There are different signatures of
+ # IDirect3DDevice8::SetCursorPosition depending on the DXSDK version
+ Method(Void, "SetCursorPosition", [(UINT, "XScreenSpace"), (UINT, "YScreenSpace"), (DWORD, "Flags")]),
Method(Void, "SetCursorPosition", [(Int, "X"), (Int, "Y"), (DWORD, "Flags")]),
Method(BOOL, "ShowCursor", [(BOOL, "bShow")]),
Method(HRESULT, "CreateAdditionalSwapChain", [Out(Pointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), Out(Pointer(PDIRECT3DSWAPCHAIN8), "pSwapChain")]),
Method(HRESULT, "GetDepthStencilSurface", [Out(Pointer(PDIRECT3DSURFACE8), "ppZStencilSurface")]),
Method(HRESULT, "BeginScene", []),
Method(HRESULT, "EndScene", []),
- Method(HRESULT, "Clear", [(DWORD, "Count"), (ConstPointer(D3DRECT), "pRects"), (DWORD, "Flags"), (D3DCOLOR, "Color"), (Float, "Z"), (DWORD, "Stencil")]),
+ Method(HRESULT, "Clear", [(DWORD, "Count"), (ConstPointer(D3DRECT), "pRects"), (D3DCLEAR, "Flags"), (D3DCOLOR, "Color"), (Float, "Z"), (DWORD, "Stencil")]),
Method(HRESULT, "SetTransform", [(D3DTRANSFORMSTATETYPE, "State"), (ConstPointer(D3DMATRIX), "pMatrix")]),
Method(HRESULT, "GetTransform", [(D3DTRANSFORMSTATETYPE, "State"), Out(Pointer(D3DMATRIX), "pMatrix")]),
Method(HRESULT, "MultiplyTransform", [(D3DTRANSFORMSTATETYPE, "State"), (ConstPointer(D3DMATRIX), "pMatrix")]),
class D3D8Tracer(DllTracer):
- pass
+ def dump_arg_instance(self, function, arg):
+ # Dump shaders as strings
+ if function.name in ('CreateVertexShader', 'CreatePixelShader') and arg.name == 'pFunction':
+ print ' DumpShader(__writer, %s);' % (arg.name)
+ return
+
+ DllTracer.dump_arg_instance(self, function, arg)
if __name__ == '__main__':
print '#include <windows.h>'
print '#include <d3d8.h>'
+ print '#include "d3dshader.hpp"'
print
- print '#include "trace_write.hpp"'
+ print '#include "trace_writer.hpp"'
print '#include "os.hpp"'
print
tracer = D3D8Tracer('d3d8.dll')