]> git.notmuchmail.org Git - apitrace/blobdiff - wrappers/d3d9trace.py
Preserve both D3D9 shader byte code, and disassembly.
[apitrace] / wrappers / d3d9trace.py
index 708f05ad13d2c8a91a0e2bfd9f6b315c8686ae1c..ebf5489352f259721da9b3f5bfc8b0fd90da5160 100644 (file)
 
 
 from dlltrace import DllTracer
-from specs.d3d9 import d3d9
+from specs.d3d9 import d3d9, D3DSHADER9
 
 
 class D3D9Tracer(DllTracer):
 
     def serializeArgValue(self, function, arg):
         # Dump shaders as strings
-        if function.name in ('CreateVertexShader', 'CreatePixelShader') and arg.name == 'pFunction':
+        if arg.type is D3DSHADER9:
             print '    DumpShader(trace::localWriter, %s);' % (arg.name)
             return