]> git.cworth.org Git - apitrace/blobdiff - d3d9.py
Use call number instead of frame number for snapshot filenames.
[apitrace] / d3d9.py
diff --git a/d3d9.py b/d3d9.py
index f2675d904399174ea59d90e275749533963bebd5..81d310aa8908a2d5023fbe5817c37ad24e81292a 100644 (file)
--- a/d3d9.py
+++ b/d3d9.py
@@ -216,12 +216,12 @@ IDirect3DDevice9.methods += [
     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")]),
@@ -231,12 +231,12 @@ IDirect3DDevice9.methods += [
     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")]),
@@ -367,13 +367,13 @@ IDirect3D9Ex.methods += [
 ]
 
 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")]),
@@ -411,14 +411,10 @@ class D3D9Tracer(DllTracer):
 
 
 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
     print '#include "trace_write.hpp"'
+    print '#include "os.hpp"'
     print
     tracer = D3D9Tracer('d3d9.dll')
     tracer.trace_api(d3d9)