Retracer.invokeFunction(self, function)
+ # Debug layers with Windows 8 or Windows 7 Platform update are a mess.
+ # It's not possible to know before hand whether they are or not
+ # available, so always retry with debug flag off..
if function.name in self.createDeviceFunctionNames:
print r' if (FAILED(_result)) {'
if function.name.startswith('D3D10CreateDevice'):
print r' if (_result == E_FAIL && (Flags & D3D10_CREATE_DEVICE_DEBUG)) {'
print r' retrace::warning(call) << "debug layer (d3d10sdklayers.dll) not installed\n";'
+ print r' Flags &= ~D3D10_CREATE_DEVICE_DEBUG;'
+ Retracer.invokeFunction(self, function)
print r' }'
-
- if function.name.startswith('D3D11CreateDevice'):
+ elif function.name.startswith('D3D11CreateDevice'):
print r' if (_result == E_FAIL && (Flags & D3D11_CREATE_DEVICE_DEBUG)) {'
print r' retrace::warning(call) << "debug layer (d3d11sdklayers.dll for Windows 7, d3d11_1sdklayers.dll for Windows 8 or Windows 7 with KB 2670838) not properly installed\n";'
+ print r' Flags &= ~D3D11_CREATE_DEVICE_DEBUG;'
+ Retracer.invokeFunction(self, function)
print r' }'
+ else:
+ assert False
+
+ print r' if (FAILED(_result)) {'
+ print r' exit(1);'
+ print r' }'
- print r' exit(1);'
print r' }'
def forceDriver(self, enum):
print r' }'
# Force driver
- if interface.name.startswith('IDXGIFactory') and method.name == 'EnumAdapters':
+ if interface.name.startswith('IDXGIFactory') and method.name.startswith('EnumAdapters'):
print r' const char *szSoftware = NULL;'
print r' switch (retrace::driver) {'
print r' case retrace::DRIVER_REFERENCE:'
print r' }'
print r' }'
print r' if (hSoftware) {'
- print r' _result = _this->CreateSoftwareAdapter(hSoftware, ppAdapter);'
+ print r' _result = _this->CreateSoftwareAdapter(hSoftware, reinterpret_cast<IDXGIAdapter **>(ppAdapter));'
print r' } else {'
Retracer.invokeInterfaceMethod(self, interface, method)
print r' }'