summaryrefslogtreecommitdiff
path: root/d3d8.py
diff options
context:
space:
mode:
authorJosé Fonseca <jose.r.fonseca@gmail.com>2011-05-21 10:14:01 +0100
committerJosé Fonseca <jose.r.fonseca@gmail.com>2011-05-21 10:14:01 +0100
commit1e5d421e42e2605939cfdb86e4479f7a1b0be8d8 (patch)
tree08dde7cb2c4f38b496515ecda5f6e94e1419fa8e /d3d8.py
parent895a20846b8c85d167b2555ad73061fb3831dcb4 (diff)
Dump D3D8 shaders too.
Diffstat (limited to 'd3d8.py')
-rw-r--r--d3d8.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/d3d8.py b/d3d8.py
index 73c9c85..07ddc47 100644
--- a/d3d8.py
+++ b/d3d8.py
@@ -282,12 +282,19 @@ d3d8.add_functions([
class D3D8Tracer(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 <d3d8.h>'
+ print '#include "d3dshader.hpp"'
print
print '#include "trace_write.hpp"'
print '#include "os.hpp"'