Add AbstractGfx for DX12

This commit is contained in:
Scott Mansell 2023-01-29 23:58:54 +13:00
parent 5a2d119bda
commit 8ad59f8ccf
9 changed files with 119 additions and 149 deletions

View file

@ -9,9 +9,10 @@
#include "Common/Logging/Log.h"
#include "VideoBackends/D3D12/Common.h"
#include "VideoBackends/D3D12/D3D12Renderer.h"
#include "VideoBackends/D3D12/D3D12Gfx.h"
#include "VideoBackends/D3D12/DX12Context.h"
#include "VideoCommon/VideoCommon.h"
#include "VideoCommon/RenderBase.h"
namespace DX12
{
@ -64,7 +65,7 @@ void PerfQuery::EnableQuery(PerfQueryGroup group)
// This is because we can't leave a query open when submitting a command list, and the draw
// call itself may need to execute a command list if we run out of descriptors. Note that
// this assumes that the caller has bound all required state prior to enabling the query.
Renderer::GetInstance()->ApplyState();
Gfx::GetInstance()->ApplyState();
if (group == PQG_ZCOMP_ZCOMPLOC || group == PQG_ZCOMP)
{
@ -261,7 +262,7 @@ void PerfQuery::PartialFlush(bool resolve, bool blocking)
{
// Submit a command buffer if there are unresolved queries (to write them to the buffer).
if (resolve && m_unresolved_queries > 0)
Renderer::GetInstance()->ExecuteCommandList(false);
Gfx::GetInstance()->ExecuteCommandList(false);
ReadbackQueries(blocking);
}