D3D12: Refactoring and cleanups

Moves render target restoring to RestoreAPIState, this also means no need
to manually restore after allocating in a buffer that caused execution,
because the manager restores it for us.

Remove a method that wasn't used from D3DUtil.cpp, and fixes a few errors
in EFB poke drawing.
This commit is contained in:
Stenzek
2016-03-05 22:38:14 +10:00
parent 7ec1fce741
commit acfa93372e
9 changed files with 23 additions and 161 deletions

View File

@ -168,7 +168,6 @@ void TextureCache::TCacheEntry::CopyRectangleFromTexture(
FramebufferManager::GetEFBColorTexture()->TransitionToResourceState(D3D::current_command_list, D3D12_RESOURCE_STATE_RENDER_TARGET);
FramebufferManager::GetEFBDepthTexture()->TransitionToResourceState(D3D::current_command_list, D3D12_RESOURCE_STATE_DEPTH_WRITE);
FramebufferManager::RestoreEFBRenderTargets();
g_renderer->RestoreAPIState();
}
@ -308,7 +307,6 @@ void TextureCache::TCacheEntry::FromRenderTarget(u8* dst, PEControl::PixelFormat
FramebufferManager::GetEFBColorTexture()->TransitionToResourceState(D3D::current_command_list, D3D12_RESOURCE_STATE_RENDER_TARGET);
FramebufferManager::GetEFBDepthTexture()->TransitionToResourceState(D3D::current_command_list, D3D12_RESOURCE_STATE_DEPTH_WRITE);
FramebufferManager::RestoreEFBRenderTargets();
g_renderer->RestoreAPIState();
}
@ -490,7 +488,6 @@ void TextureCache::ConvertTexture(TCacheEntryBase* entry, TCacheEntryBase* uncon
FramebufferManager::GetEFBColorTexture()->TransitionToResourceState(D3D::current_command_list, D3D12_RESOURCE_STATE_RENDER_TARGET);
FramebufferManager::GetEFBDepthTexture()->TransitionToResourceState(D3D::current_command_list, D3D12_RESOURCE_STATE_DEPTH_WRITE );
FramebufferManager::RestoreEFBRenderTargets();
g_renderer->RestoreAPIState();
}