mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-15 19:16:32 +00:00
Fix D3D11 overlays not displaying due to overwritten renderstate
This commit is contained in:
@@ -69,11 +69,9 @@ static void SetRTVDesc(D3D11_RENDER_TARGET_VIEW_DESC &rtDesc, const D3D11_TEXTUR
|
||||
|
||||
RenderOutputSubresource D3D11Replay::GetRenderOutputSubresource(ResourceId id)
|
||||
{
|
||||
D3D11RenderState *rs = m_pDevice->GetImmediateContext()->GetCurrentPipelineState();
|
||||
|
||||
for(size_t i = 0; i < D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; i++)
|
||||
{
|
||||
ID3D11RenderTargetView *rtv = rs->OM.RenderTargets[i];
|
||||
ID3D11RenderTargetView *rtv = m_RenderStateOM.RenderTargets[i];
|
||||
ID3D11Resource *res = NULL;
|
||||
if(rtv)
|
||||
{
|
||||
@@ -92,7 +90,7 @@ RenderOutputSubresource D3D11Replay::GetRenderOutputSubresource(ResourceId id)
|
||||
}
|
||||
|
||||
{
|
||||
ID3D11DepthStencilView *dsv = rs->OM.DepthView;
|
||||
ID3D11DepthStencilView *dsv = m_RenderStateOM.DepthView;
|
||||
ID3D11Resource *res = NULL;
|
||||
if(dsv)
|
||||
{
|
||||
|
||||
@@ -713,6 +713,8 @@ void D3D11Replay::SavePipelineState(uint32_t eventId)
|
||||
|
||||
D3D11RenderState *rs = m_pDevice->GetImmediateContext()->GetCurrentPipelineState();
|
||||
|
||||
m_RenderStateOM = rs->OM;
|
||||
|
||||
D3D11Pipe::State &ret = *m_D3D11PipelineState;
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
@@ -494,4 +494,7 @@ private:
|
||||
FrameRecord m_FrameRecord;
|
||||
|
||||
D3D11Pipe::State *m_D3D11PipelineState = NULL;
|
||||
|
||||
// save the clean replay-time render state OM to check against
|
||||
D3D11RenderState::OutputMerger m_RenderStateOM;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user