diff options
| author | Stenzek <stenzek@gmail.com> | 2016-03-05 22:38:14 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2016-05-08 12:08:25 +1000 |
| commit | acfa93372ec58faac05f9ed7c8ac0d6ed5ad403e (patch) | |
| tree | 6a0ad014012e1de0ac6e6704934bbf53887c6248 /Source/Core/VideoBackends/D3D12/BoundingBox.cpp | |
| parent | 7ec1fce74111be9a926124a9d5e895a380696cd8 (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/BoundingBox.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D12/BoundingBox.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Source/Core/VideoBackends/D3D12/BoundingBox.cpp b/Source/Core/VideoBackends/D3D12/BoundingBox.cpp index 48cb3ce613..8e64d2a16e 100644 --- a/Source/Core/VideoBackends/D3D12/BoundingBox.cpp +++ b/Source/Core/VideoBackends/D3D12/BoundingBox.cpp @@ -121,12 +121,7 @@ void BBox::Set(int index, int value) memcpy(reinterpret_cast<u8*>(s_bbox_staging_buffer_map) + (index * sizeof(int)), &value, sizeof(int)); } - if (s_bbox_stream_buffer->AllocateSpaceInBuffer(sizeof(int), sizeof(int))) - { - // Command list was executed, reset state - g_renderer->SetViewport(); - FramebufferManager::RestoreEFBRenderTargets(); - } + s_bbox_stream_buffer->AllocateSpaceInBuffer(sizeof(int), sizeof(int)); // Allocate temporary bytes in upload buffer, then copy to real buffer. memcpy(s_bbox_stream_buffer->GetCPUAddressOfCurrentAllocation(), &value, sizeof(int)); @@ -147,8 +142,6 @@ int BBox::Get(int index) D3D::ResourceBarrier(D3D::current_command_list, s_bbox_buffer, D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, 0); D3D::command_list_mgr->ExecuteQueuedWork(true); - g_renderer->SetViewport(); - FramebufferManager::RestoreEFBRenderTargets(); CheckHR(s_bbox_staging_buffer->Map(0, nullptr, &s_bbox_staging_buffer_map)); } |
