mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Add better debug naming for D3D11 overlay resources
This commit is contained in:
@@ -37,6 +37,8 @@ void D3D11Replay::OutputWindow::MakeRTV()
|
||||
{
|
||||
hr = swap->GetBuffer(0, __uuidof(ID3D11Texture2D), (void **)&texture);
|
||||
|
||||
SetDebugName(texture, "Output window backbuffer 0");
|
||||
|
||||
dev->CheckHRESULT(hr);
|
||||
|
||||
if(FAILED(hr))
|
||||
@@ -63,6 +65,8 @@ void D3D11Replay::OutputWindow::MakeRTV()
|
||||
texDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;
|
||||
|
||||
hr = dev->CreateTexture2D(&texDesc, NULL, &texture);
|
||||
|
||||
SetDebugName(texture, "Output window fake backbuffer 0");
|
||||
}
|
||||
|
||||
hr = dev->CreateRenderTargetView(texture, NULL, &rtv);
|
||||
@@ -107,6 +111,8 @@ void D3D11Replay::OutputWindow::MakeDSV()
|
||||
|
||||
HRESULT hr = dev->CreateTexture2D(&texDesc, NULL, &texture);
|
||||
|
||||
SetDebugName(texture, "Output window depth");
|
||||
|
||||
dev->CheckHRESULT(hr);
|
||||
|
||||
if(FAILED(hr))
|
||||
@@ -301,6 +307,8 @@ void D3D11Replay::GetOutputWindowData(uint64_t id, bytebuf &retData)
|
||||
if(!outw.rtv)
|
||||
return;
|
||||
|
||||
D3D11MarkerRegion renderoverlay("GetOutputWindowData");
|
||||
|
||||
ID3D11Texture2D *texture = NULL;
|
||||
{
|
||||
ID3D11Resource *res = NULL;
|
||||
@@ -328,6 +336,8 @@ void D3D11Replay::GetOutputWindowData(uint64_t id, bytebuf &retData)
|
||||
|
||||
HRESULT hr = m_pDevice->CreateTexture2D(&texDesc, NULL, &readback);
|
||||
|
||||
SetDebugName(readback, "Output window readback");
|
||||
|
||||
m_pDevice->CheckHRESULT(hr);
|
||||
|
||||
if(FAILED(hr))
|
||||
@@ -346,6 +356,8 @@ void D3D11Replay::GetOutputWindowData(uint64_t id, bytebuf &retData)
|
||||
|
||||
hr = m_pDevice->CreateTexture2D(&texDesc, NULL, &resolve);
|
||||
|
||||
SetDebugName(resolve, "Output window resolve");
|
||||
|
||||
m_pDevice->CheckHRESULT(hr);
|
||||
|
||||
if(FAILED(hr))
|
||||
|
||||
@@ -124,7 +124,7 @@ ResourceId D3D11Replay::RenderOverlay(ResourceId texid, FloatVector clearCol, De
|
||||
sub = RenderOutputSubresource(0, 0, 1);
|
||||
}
|
||||
|
||||
D3D11MarkerRegion renderoverlay(StringFormat::Fmt("RenderOverlay %d", overlay));
|
||||
D3D11MarkerRegion renderoverlay(StringFormat::Fmt("RenderOverlay %s", ToStr(overlay).c_str()));
|
||||
|
||||
ResourceId id = texid;
|
||||
|
||||
@@ -176,6 +176,8 @@ ResourceId D3D11Replay::RenderOverlay(ResourceId texid, FloatVector clearCol, De
|
||||
}
|
||||
wrappedCustomRenderTex = (WrappedID3D11Texture2D1 *)customRenderTex;
|
||||
|
||||
SetDebugName(wrappedCustomRenderTex, "Overlay render texture");
|
||||
|
||||
m_Overlay.Texture = wrappedCustomRenderTex;
|
||||
m_Overlay.resourceId = wrappedCustomRenderTex->GetResourceID();
|
||||
}
|
||||
@@ -220,6 +222,9 @@ ResourceId D3D11Replay::RenderOverlay(ResourceId texid, FloatVector clearCol, De
|
||||
return m_Overlay.resourceId;
|
||||
}
|
||||
|
||||
SetDebugName(preDrawDepth, "Pre-draw overlay depth");
|
||||
SetDebugName(renderDepth, "Render overlay depth");
|
||||
|
||||
m_pImmediateContext->CopyResource(preDrawDepth, realDepth);
|
||||
|
||||
SAFE_RELEASE(realDepth);
|
||||
|
||||
Reference in New Issue
Block a user