X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=d3d9.py;h=640d218dc7a8c2b4726d142cd268e6ec92e128ca;hb=c5b741c83e804f1e438caca83565a76e254d0b94;hp=e2d5ba646b9eb86bfcf9191e057046d37e2f7bcd;hpb=1e5d421e42e2605939cfdb86e4479f7a1b0be8d8;p=apitrace diff --git a/d3d9.py b/d3d9.py index e2d5ba6..640d218 100644 --- a/d3d9.py +++ b/d3d9.py @@ -442,10 +442,10 @@ d3d9.add_functions([ StdFunction(HRESULT, "Direct3DCreate9Ex", [(UINT, "SDKVersion"), Out(Pointer(PDIRECT3D9EX), "ppD3D")], fail='D3DERR_NOTAVAILABLE'), StdFunction(Int, "D3DPERF_BeginEvent", [(D3DCOLOR, "col"), (LPCWSTR, "wszName")], fail='-1'), StdFunction(Int, "D3DPERF_EndEvent", [], fail='-1'), - StdFunction(Void, "D3DPERF_SetMarker", [(D3DCOLOR, "col"), (LPCWSTR, "wszName")], fail=''), - StdFunction(Void, "D3DPERF_SetRegion", [(D3DCOLOR, "col"), (LPCWSTR, "wszName")], fail=''), + StdFunction(Void, "D3DPERF_SetMarker", [(D3DCOLOR, "col"), (LPCWSTR, "wszName")]), + StdFunction(Void, "D3DPERF_SetRegion", [(D3DCOLOR, "col"), (LPCWSTR, "wszName")]), StdFunction(BOOL, "D3DPERF_QueryRepeatFrame", [], fail='FALSE'), - StdFunction(Void, "D3DPERF_SetOptions", [(DWORD, "dwOptions")], fail=''), + StdFunction(Void, "D3DPERF_SetOptions", [(DWORD, "dwOptions")]), StdFunction(DWORD, "D3DPERF_GetStatus", [], fail='0'), ]) @@ -455,19 +455,19 @@ class D3D9Tracer(DllTracer): 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) + print ' DumpShader(Trace::localWriter, %s);' % (arg.name) return DllTracer.dump_arg_instance(self, function, arg) if __name__ == '__main__': + print '#include "trace_writer.hpp"' + print '#include "os.hpp"' + print print '#include "d3d9imports.hpp"' print '#include "d3dshader.hpp"' print - print '#include "trace_write.hpp"' - print '#include "os.hpp"' - print tracer = D3D9Tracer('d3d9.dll') tracer.trace_api(d3d9)