- if 'Software' in function.argNames():
- print r' if (Software) {'
- print r' retrace::warning(call) << "software device\n";'
- print r' Software = LoadLibraryA("d3d10warp");'
- print r' }'
+ def invokeFunction(self, function):
+ if function.name in self.createDeviceFunctionNames:
+ # create windows as neccessary
+ if 'pSwapChainDesc' in function.argNames():
+ print r' pSwapChainDesc->OutputWindow = d3dretrace::createWindow(512, 512);'
+
+ # Compensate for the fact we don't trace the software renderer
+ # module LoadLibrary call
+ if 'Software' in function.argNames():
+ print r' if (Software) {'
+ print r' retrace::warning(call) << "using WARP for software device\n";'
+ print r' Software = LoadLibraryA("d3d10warp");'
+ print r' }'
+
+ # Compensate for the fact we don't trace DXGI object creation
+ if function.name.startswith('D3D11CreateDevice'):
+ print r' if (DriverType == D3D_DRIVER_TYPE_UNKNOWN && !pAdapter) {'
+ print r' DriverType = D3D_DRIVER_TYPE_HARDWARE;'
+ print r' }'