Method(HRESULT, "CreateVertexShader", [(D3DSHADER9, "pFunction"), Out(Pointer(PDIRECT3DVERTEXSHADER9), "ppShader")]),
Method(HRESULT, "SetVertexShader", [(PDIRECT3DVERTEXSHADER9, "pShader")]),
Method(HRESULT, "GetVertexShader", [Out(Pointer(PDIRECT3DVERTEXSHADER9), "ppShader")]),
- Method(HRESULT, "SetVertexShaderConstantF", [(UINT, "StartRegister"), (ConstPointer(Float), "pConstantData"), (UINT, "Vector4fCount")]),
- Method(HRESULT, "GetVertexShaderConstantF", [(UINT, "StartRegister"), Out(Pointer(Float), "pConstantData"), (UINT, "Vector4fCount")]),
- Method(HRESULT, "SetVertexShaderConstantI", [(UINT, "StartRegister"), (ConstPointer(Int), "pConstantData"), (UINT, "Vector4iCount")]),
- Method(HRESULT, "GetVertexShaderConstantI", [(UINT, "StartRegister"), Out(Pointer(Int), "pConstantData"), (UINT, "Vector4iCount")]),
- Method(HRESULT, "SetVertexShaderConstantB", [(UINT, "StartRegister"), (ConstPointer(BOOL), "pConstantData"), (UINT, "BoolCount")]),
- Method(HRESULT, "GetVertexShaderConstantB", [(UINT, "StartRegister"), Out(Pointer(BOOL), "pConstantData"), (UINT, "BoolCount")]),
+ Method(HRESULT, "SetVertexShaderConstantF", [(UINT, "StartRegister"), (Const(Array(Float, "4*Vector4fCount")), "pConstantData"), (UINT, "Vector4fCount")]),
+ Method(HRESULT, "GetVertexShaderConstantF", [(UINT, "StartRegister"), Out(Array(Float, "4*Vector4fCount"), "pConstantData"), (UINT, "Vector4fCount")]),
+ Method(HRESULT, "SetVertexShaderConstantI", [(UINT, "StartRegister"), (Const(Array(Int, "4*Vector4iCount")), "pConstantData"), (UINT, "Vector4iCount")]),
+ Method(HRESULT, "GetVertexShaderConstantI", [(UINT, "StartRegister"), Out(Array(Int, "4*Vector4iCount"), "pConstantData"), (UINT, "Vector4iCount")]),
+ Method(HRESULT, "SetVertexShaderConstantB", [(UINT, "StartRegister"), (Const(Array(BOOL, "BoolCount")), "pConstantData"), (UINT, "BoolCount")]),
+ Method(HRESULT, "GetVertexShaderConstantB", [(UINT, "StartRegister"), Out(Array(BOOL, "BoolCount"), "pConstantData"), (UINT, "BoolCount")]),
Method(HRESULT, "SetStreamSource", [(UINT, "StreamNumber"), (PDIRECT3DVERTEXBUFFER9, "pStreamData"), (UINT, "OffsetInBytes"), (UINT, "Stride")]),
Method(HRESULT, "GetStreamSource", [(UINT, "StreamNumber"), Out(Pointer(PDIRECT3DVERTEXBUFFER9), "ppStreamData"), Out(Pointer(UINT), "pOffsetInBytes"), Out(Pointer(UINT), "pStride")]),
Method(HRESULT, "SetStreamSourceFreq", [(UINT, "StreamNumber"), (UINT, "Setting")]),
Method(HRESULT, "CreatePixelShader", [(D3DSHADER9, "pFunction"), Out(Pointer(PDIRECT3DPIXELSHADER9), "ppShader")]),
Method(HRESULT, "SetPixelShader", [(PDIRECT3DPIXELSHADER9, "pShader")]),
Method(HRESULT, "GetPixelShader", [Out(Pointer(PDIRECT3DPIXELSHADER9), "ppShader")]),
- Method(HRESULT, "SetPixelShaderConstantF", [(UINT, "StartRegister"), (ConstPointer(Float), "pConstantData"), (UINT, "Vector4fCount")]),
- Method(HRESULT, "GetPixelShaderConstantF", [(UINT, "StartRegister"), Out(Pointer(Float), "pConstantData"), (UINT, "Vector4fCount")]),
- Method(HRESULT, "SetPixelShaderConstantI", [(UINT, "StartRegister"), (ConstPointer(Int), "pConstantData"), (UINT, "Vector4iCount")]),
- Method(HRESULT, "GetPixelShaderConstantI", [(UINT, "StartRegister"), Out(Pointer(Int), "pConstantData"), (UINT, "Vector4iCount")]),
- Method(HRESULT, "SetPixelShaderConstantB", [(UINT, "StartRegister"), (ConstPointer(BOOL), "pConstantData"), (UINT, "BoolCount")]),
- Method(HRESULT, "GetPixelShaderConstantB", [(UINT, "StartRegister"), Out(Pointer(BOOL), "pConstantData"), (UINT, "BoolCount")]),
+ Method(HRESULT, "SetPixelShaderConstantF", [(UINT, "StartRegister"), (Const(Array(Float, "4*Vector4fCount")), "pConstantData"), (UINT, "Vector4fCount")]),
+ Method(HRESULT, "GetPixelShaderConstantF", [(UINT, "StartRegister"), Out(Array(Float, "4*Vector4fCount"), "pConstantData"), (UINT, "Vector4fCount")]),
+ Method(HRESULT, "SetPixelShaderConstantI", [(UINT, "StartRegister"), (Const(Array(Int, "4*Vector4iCount")), "pConstantData"), (UINT, "Vector4iCount")]),
+ Method(HRESULT, "GetPixelShaderConstantI", [(UINT, "StartRegister"), Out(Array(Int, "4*Vector4iCount"), "pConstantData"), (UINT, "Vector4iCount")]),
+ Method(HRESULT, "SetPixelShaderConstantB", [(UINT, "StartRegister"), (Const(Array(BOOL, "BoolCount")), "pConstantData"), (UINT, "BoolCount")]),
+ Method(HRESULT, "GetPixelShaderConstantB", [(UINT, "StartRegister"), Out(Array(BOOL, "BoolCount"), "pConstantData"), (UINT, "BoolCount")]),
Method(HRESULT, "DrawRectPatch", [(UINT, "Handle"), (ConstPointer(Float), "pNumSegs"), (ConstPointer(D3DRECTPATCH_INFO), "pRectPatchInfo")]),
Method(HRESULT, "DrawTriPatch", [(UINT, "Handle"), (ConstPointer(Float), "pNumSegs"), (ConstPointer(D3DTRIPATCH_INFO), "pTriPatchInfo")]),
Method(HRESULT, "DeletePatch", [(UINT, "Handle")]),
]
IDirect3DDevice9Ex.methods += [
- Method(HRESULT, "SetConvolutionMonoKernel", [(UINT, "width"), (UINT, "height"), Out(Pointer(Float), "rows"), Out(Pointer(Float), "columns")]),
+ Method(HRESULT, "SetConvolutionMonoKernel", [(UINT, "width"), (UINT, "height"), (Array(Float, "width"), "rows"), (Array(Float, "height"), "columns")]),
Method(HRESULT, "ComposeRects", [(PDIRECT3DSURFACE9, "pSrc"), (PDIRECT3DSURFACE9, "pDst"), (PDIRECT3DVERTEXBUFFER9, "pSrcRectDescs"), (UINT, "NumRects"), (PDIRECT3DVERTEXBUFFER9, "pDstRectDescs"), (D3DCOMPOSERECTSOP, "Operation"), (Int, "Xoffset"), (Int, "Yoffset")]),
Method(HRESULT, "PresentEx", [(ConstPointer(RECT), "pSourceRect"), (ConstPointer(RECT), "pDestRect"), (HWND, "hDestWindowOverride"), (ConstPointer(RGNDATA), "pDirtyRegion"), (DWORD, "dwFlags")]),
Method(HRESULT, "GetGPUThreadPriority", [Out(Pointer(INT), "pPriority")]),
Method(HRESULT, "SetGPUThreadPriority", [(INT, "Priority")]),
Method(HRESULT, "WaitForVBlank", [(UINT, "iSwapChain")]),
- Method(HRESULT, "CheckResourceResidency", [Out(Pointer(PDIRECT3DRESOURCE9), "pResourceArray"), (UINT32, "NumResources")]),
+ Method(HRESULT, "CheckResourceResidency", [(Array(PDIRECT3DRESOURCE9, "NumResources"), "pResourceArray"), (UINT32, "NumResources")]),
Method(HRESULT, "SetMaximumFrameLatency", [(UINT, "MaxLatency")]),
Method(HRESULT, "GetMaximumFrameLatency", [Out(Pointer(UINT), "pMaxLatency")]),
Method(HRESULT, "CheckDeviceState", [(HWND, "hDestinationWindow")]),
class D3D9Tracer(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(%s);' % (arg.name)
+ return
+ DllTracer.dump_arg_instance(self, function, arg)
if __name__ == '__main__':
- print '#include <windows.h>'
- print '#include <tchar.h>'
- print
- print '#include "compat.h"'
- print
- print '#include <d3d9.h>'
+ print '#include "d3d9imports.hpp"'
+ print '#include "d3d9shader.hpp"'
print
print '#include "trace_write.hpp"'
print '#include "os.hpp"'