D3D: Remove BeginFrame/EndFrame
These functions did not do anything anyway. There is also no need to present the backbuffer when shutting down.
This commit is contained in:
parent
d9400f708a
commit
c5a89b6483
|
@ -52,8 +52,6 @@ const D3D_FEATURE_LEVEL supported_feature_levels[NUM_SUPPORTED_FEATURE_LEVELS] =
|
||||||
|
|
||||||
unsigned int xres, yres;
|
unsigned int xres, yres;
|
||||||
|
|
||||||
bool bFrameInProgress = false;
|
|
||||||
|
|
||||||
HRESULT LoadDXGI()
|
HRESULT LoadDXGI()
|
||||||
{
|
{
|
||||||
if (dxgi_dll_ref++ > 0)
|
if (dxgi_dll_ref++ > 0)
|
||||||
|
@ -602,27 +600,6 @@ void Reset()
|
||||||
SetDebugObjectName(backbuf->GetRTV(), "backbuffer render target view");
|
SetDebugObjectName(backbuf->GetRTV(), "backbuffer render target view");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BeginFrame()
|
|
||||||
{
|
|
||||||
if (bFrameInProgress)
|
|
||||||
{
|
|
||||||
PanicAlert("BeginFrame called although a frame is already in progress");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
bFrameInProgress = true;
|
|
||||||
return (device != nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
void EndFrame()
|
|
||||||
{
|
|
||||||
if (!bFrameInProgress)
|
|
||||||
{
|
|
||||||
PanicAlert("EndFrame called although no frame is in progress");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
bFrameInProgress = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Present()
|
void Present()
|
||||||
{
|
{
|
||||||
UINT present_flags = 0;
|
UINT present_flags = 0;
|
||||||
|
|
|
@ -63,8 +63,6 @@ extern HWND hWnd;
|
||||||
extern bool bFrameInProgress;
|
extern bool bFrameInProgress;
|
||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
bool BeginFrame();
|
|
||||||
void EndFrame();
|
|
||||||
void Present();
|
void Present();
|
||||||
|
|
||||||
unsigned int GetBackBufferWidth();
|
unsigned int GetBackBufferWidth();
|
||||||
|
|
|
@ -81,14 +81,11 @@ Renderer::Renderer() : ::Renderer(D3D::GetBackBufferWidth(), D3D::GetBackBufferH
|
||||||
D3D11_VIEWPORT vp = CD3D11_VIEWPORT(0.f, 0.f, (float)m_target_width, (float)m_target_height);
|
D3D11_VIEWPORT vp = CD3D11_VIEWPORT(0.f, 0.f, (float)m_target_width, (float)m_target_height);
|
||||||
D3D::context->RSSetViewports(1, &vp);
|
D3D::context->RSSetViewports(1, &vp);
|
||||||
FramebufferManager::BindEFBRenderTarget();
|
FramebufferManager::BindEFBRenderTarget();
|
||||||
D3D::BeginFrame();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Renderer::~Renderer()
|
Renderer::~Renderer()
|
||||||
{
|
{
|
||||||
TeardownDeviceObjects();
|
TeardownDeviceObjects();
|
||||||
D3D::EndFrame();
|
|
||||||
D3D::Present();
|
|
||||||
D3D::Close();
|
D3D::Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -607,7 +604,6 @@ void Renderer::SwapImpl(AbstractTexture* texture, const EFBRectangle& xfb_region
|
||||||
Renderer::DrawDebugText();
|
Renderer::DrawDebugText();
|
||||||
|
|
||||||
OSD::DrawMessages();
|
OSD::DrawMessages();
|
||||||
D3D::EndFrame();
|
|
||||||
|
|
||||||
g_texture_cache->Cleanup(frameCount);
|
g_texture_cache->Cleanup(frameCount);
|
||||||
|
|
||||||
|
@ -668,7 +664,6 @@ void Renderer::SwapImpl(AbstractTexture* texture, const EFBRectangle& xfb_region
|
||||||
|
|
||||||
// begin next frame
|
// begin next frame
|
||||||
RestoreAPIState();
|
RestoreAPIState();
|
||||||
D3D::BeginFrame();
|
|
||||||
FramebufferManager::BindEFBRenderTarget();
|
FramebufferManager::BindEFBRenderTarget();
|
||||||
SetViewport();
|
SetViewport();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue