X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fdxgiretrace.py;h=6cd285d23b3001dc34a234a1610fdb7cacee7e9e;hb=25e08d072ae40fffa99b72dab0429c6ed25b19ce;hp=2eeb3ca616693dbc42689ab93d5d318cc3a8cbec;hpb=db62f0f52959d781874bb3b58794d86f426d2158;p=apitrace diff --git a/retrace/dxgiretrace.py b/retrace/dxgiretrace.py index 2eeb3ca..6cd285d 100644 --- a/retrace/dxgiretrace.py +++ b/retrace/dxgiretrace.py @@ -114,20 +114,31 @@ createWindow(DXGI_SWAP_CHAIN_DESC *pSwapChainDesc) { 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):