]> git.cworth.org Git - apitrace/blobdiff - retrace/d3dcommonretrace.py
retrace: More diagnostic information.
[apitrace] / retrace / d3dcommonretrace.py
index 9cd5da51f579cad0011edc22e80aa7071a351862..add1a5040a87710615ac02e89e1921ced48524a5 100644 (file)
@@ -39,25 +39,11 @@ from specs.d3d11 import d3d11
 class D3DRetracer(Retracer):
 
     def retraceApi(self, api):
-        print '''
-image::Image *
-retrace::getSnapshot(void) {
-    return NULL;
-}
-
-
-bool
-retrace::dumpState(std::ostream &os)
-{
-    return false;
-}
-'''
-
         print '// Swizzling mapping for lock addresses'
         print 'static std::map<void *, void *> _maps;'
         print
 
-        self.table_name = 'd3dretrace::d3d_callbacks'
+        self.table_name = 'd3dretrace::d3d10_callbacks'
 
         Retracer.retraceApi(self, api)
 
@@ -66,8 +52,15 @@ retrace::dumpState(std::ostream &os)
         if function.name in ('D3D10CreateDeviceAndSwapChain', 'D3D10CreateDeviceAndSwapChain1', 'D3D11CreateDeviceAndSwapChain'):
             print r'    pSwapChainDesc->OutputWindow = d3dretrace::createWindow(512, 512);'
 
+        if 'Software' in function.argNames():
+            print r'    if (Software) {'
+            print r'        retrace::warning(call) << "software device\n";'
+            print r'        Software = LoadLibraryA("d3d10warp");'
+            print r'    }'
+
         Retracer.invokeFunction(self, function)
 
+
     def invokeInterfaceMethod(self, interface, method):
         # keep track of the last used device for state dumping
         #if interface.name in ('IDirect3DDevice9', 'IDirect3DDevice9Ex'):