]> git.cworth.org Git - apitrace/blobdiff - d3d9.py
Add an option to indent the glsl code in the shader viewer.
[apitrace] / d3d9.py
diff --git a/d3d9.py b/d3d9.py
index 81401627c43385031aad6b3735f07bf7e77f7e48..251f2920fb90cf37110c369a326446c1503ac3a0 100644 (file)
--- a/d3d9.py
+++ b/d3d9.py
@@ -28,7 +28,7 @@
 from winapi import *
 from d3d9types import *
 from d3d9caps import *
-from trace import DllTracer
+
 
 D3DSHADER9 = Opaque("const DWORD *")
 
@@ -442,32 +442,9 @@ 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'),
 ])
-
-
-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)
-            return
-
-        DllTracer.dump_arg_instance(self, function, arg)
-
-
-if __name__ == '__main__':
-    print '#include "d3d9imports.hpp"'
-    print '#include "d3dshader.hpp"'
-    print
-    print '#include "trace_writer.hpp"'
-    print '#include "os.hpp"'
-    print
-    tracer = D3D9Tracer('d3d9.dll')
-    tracer.trace_api(d3d9)
-