X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=wrappers%2Fd3d10trace.py;h=d43f042b08f2a8e6efa1328f045b524f24cc88ac;hb=bf1f242397b87c2d501b1ca7a8045f7f3649ca3b;hp=d13f65d3bc139b632642ac1d031fc5a436adb9e5;hpb=3662cf3d9f8838e6c19d4606f5a5d800fb66d61a;p=apitrace diff --git a/wrappers/d3d10trace.py b/wrappers/d3d10trace.py index d13f65d..d43f042 100644 --- a/wrappers/d3d10trace.py +++ b/wrappers/d3d10trace.py @@ -25,21 +25,28 @@ from dlltrace import DllTracer +from specs import stdapi from specs.d3d10misc import d3d10 +class D3D10Tracer(DllTracer): + + def serializeArgValue(self, function, arg): + # Dump shaders as strings + if isinstance(arg.type, stdapi.Blob) and arg.name.startswith('pShaderBytecode'): + print ' DumpShader(trace::localWriter, %s, %s);' % (arg.name, arg.type.size) + return + + DllTracer.serializeArgValue(self, function, arg) + if __name__ == '__main__': print '#define INITGUID' print print '#include "trace_writer_local.hpp"' print '#include "os.hpp"' print - print '#include ' - print - print '#include "compat.h"' - print - print '#include ' - print '#include ' + print '#include "d3d10imports.hpp"' + print '#include "d3d10shader.hpp"' print - tracer = DllTracer('d3d10.dll') + tracer = D3D10Tracer('d3d10.dll') tracer.traceApi(d3d10)