mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-07 10:30:31 +00:00
Speculative workaround for DXGI bug
* DXGI sometimes seems to return DXGI_INVALID_CALL when retrieving backbuffers. In this case we want to gracefully handle it instead of crashing and hope it will fix itself next time we try.
This commit is contained in:
@@ -1525,10 +1525,13 @@ void WrappedID3D11Device::NewSwapchainBuffer(IUnknown *backbuffer)
|
||||
{
|
||||
WrappedID3D11Texture2D1 *wrapped = (WrappedID3D11Texture2D1 *)backbuffer;
|
||||
|
||||
// add internal reference to keep this texture alive
|
||||
SAFE_INTADDREF(wrapped);
|
||||
// release the external reference
|
||||
wrapped->Release();
|
||||
if(wrapped)
|
||||
{
|
||||
// add internal reference to keep this texture alive
|
||||
SAFE_INTADDREF(wrapped);
|
||||
// release the external reference
|
||||
wrapped->Release();
|
||||
}
|
||||
}
|
||||
|
||||
void WrappedID3D11Device::ReleaseSwapchainResources(IDXGISwapper *swapper, UINT QueueCount,
|
||||
|
||||
Reference in New Issue
Block a user