mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-09 09:10:49 +00:00
Add error checking for textures failing to create
This commit is contained in:
@@ -789,7 +789,16 @@ bool WrappedID3D11Device::Serialise_InitialState(SerialiserType &ser, ResourceId
|
||||
ID3D11Texture2D *contentsMS = NULL;
|
||||
hr = m_pDevice->CreateTexture2D(&desc, NULL, &contentsMS);
|
||||
|
||||
m_DebugManager->CopyArrayToTex2DMS(contentsMS, dataTex, ~0U);
|
||||
if(FAILED(hr) || contentsMS == NULL)
|
||||
{
|
||||
RDCERR("Failed to create MSAA texture for Texture2D initial contents HRESULT: %s",
|
||||
ToStr(hr).c_str());
|
||||
ret = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_DebugManager->CopyArrayToTex2DMS(contentsMS, dataTex, ~0U);
|
||||
}
|
||||
|
||||
SAFE_RELEASE(dataTex);
|
||||
dataTex = contentsMS;
|
||||
|
||||
Reference in New Issue
Block a user