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:
@ -58,12 +58,7 @@ void ReplaceRGBATexture2D(ID3D12Resource* texture12, const u8* buffer, unsigned
|
||||
if (!s_texture_upload_stream_buffer)
|
||||
s_texture_upload_stream_buffer = std::make_unique<D3DStreamBuffer>(INITIAL_TEXTURE_UPLOAD_BUFFER_SIZE, MAXIMUM_TEXTURE_UPLOAD_BUFFER_SIZE, nullptr);
|
||||
|
||||
bool current_command_list_executed = s_texture_upload_stream_buffer->AllocateSpaceInBuffer(upload_size, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT);
|
||||
if (current_command_list_executed)
|
||||
{
|
||||
g_renderer->SetViewport();
|
||||
FramebufferManager::RestoreEFBRenderTargets();
|
||||
}
|
||||
s_texture_upload_stream_buffer->AllocateSpaceInBuffer(upload_size, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT);
|
||||
|
||||
upload_buffer = s_texture_upload_stream_buffer->GetBuffer();
|
||||
upload_buffer_offset = s_texture_upload_stream_buffer->GetOffsetOfCurrentAllocation();
|
||||
|
Reference in New Issue
Block a user