mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
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:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user