mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-25 16:06:31 +00:00
Don't name a resource before checking if it created successfully
This commit is contained in:
@@ -2661,14 +2661,14 @@ uint32_t D3D12DebugManager::PickVertex(uint32_t eventID, const MeshDisplay &cfg,
|
||||
D3D12_RESOURCE_STATE_GENERIC_READ, NULL,
|
||||
__uuidof(ID3D12Resource), (void **)&m_PickVB);
|
||||
|
||||
m_PickVB->SetName(L"m_PickVB");
|
||||
|
||||
if(FAILED(hr))
|
||||
{
|
||||
RDCERR("Couldn't create pick vertex buffer: %08x", hr);
|
||||
return ~0U;
|
||||
}
|
||||
|
||||
m_PickVB->SetName(L"m_PickVB");
|
||||
|
||||
sdesc.Buffer.NumElements = cfg.position.numVerts;
|
||||
m_WrappedDevice->CreateShaderResourceView(m_PickVB, &sdesc, GetCPUHandle(PICK_VB_SRV));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user