summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D12/D3DTexture.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2016-03-05 22:38:14 +1000
committerStenzek <stenzek@gmail.com>2016-05-08 12:08:25 +1000
commitacfa93372ec58faac05f9ed7c8ac0d6ed5ad403e (patch)
tree6a0ad014012e1de0ac6e6704934bbf53887c6248 /Source/Core/VideoBackends/D3D12/D3DTexture.cpp
parent7ec1fce74111be9a926124a9d5e895a380696cd8 (diff)
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.
Diffstat (limited to 'Source/Core/VideoBackends/D3D12/D3DTexture.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D12/D3DTexture.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/Source/Core/VideoBackends/D3D12/D3DTexture.cpp b/Source/Core/VideoBackends/D3D12/D3DTexture.cpp
index 26141d2ae3..dd48391467 100644
--- a/Source/Core/VideoBackends/D3D12/D3DTexture.cpp
+++ b/Source/Core/VideoBackends/D3D12/D3DTexture.cpp
@@ -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();