Move Presenting, Dumping and ImGui out of Renderer

This commit is contained in:
Scott Mansell
2023-01-27 17:03:15 +13:00
parent c38c76abad
commit 0d4537d60f
29 changed files with 1766 additions and 1394 deletions

View File

@ -15,6 +15,7 @@
#include "VideoBackends/D3D12/DX12Texture.h"
#include "VideoBackends/D3D12/DX12VertexFormat.h"
#include "VideoBackends/D3D12/DescriptorHeapManager.h"
#include "VideoCommon/Present.h"
#include "VideoCommon/VideoConfig.h"
namespace DX12
@ -419,9 +420,9 @@ void Renderer::BindBackbuffer(const ClearColor& clear_color)
void Renderer::CheckForSwapChainChanges()
{
const bool surface_changed = m_surface_changed.TestAndClear();
const bool surface_changed = g_presenter->SurfaceChangedTestAndClear();
const bool surface_resized =
m_surface_resized.TestAndClear() || m_swap_chain->CheckForFullscreenChange();
g_presenter->SurfaceResizedTestAndClear() || m_swap_chain->CheckForFullscreenChange();
if (!surface_changed && !surface_resized)
return;
@ -429,8 +430,7 @@ void Renderer::CheckForSwapChainChanges()
WaitForGPUIdle();
if (surface_changed)
{
m_swap_chain->ChangeSurface(m_new_surface_handle);
m_new_surface_handle = nullptr;
m_swap_chain->ChangeSurface(g_presenter->GetNewSurfaceHandle());
}
else
{