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:
Stenzek 2017-11-21 19:55:14 +10:00
parent d9400f708a
commit c5a89b6483
3 changed files with 0 additions and 30 deletions

View File

@ -52,8 +52,6 @@ const D3D_FEATURE_LEVEL supported_feature_levels[NUM_SUPPORTED_FEATURE_LEVELS] =
unsigned int xres, yres;
bool bFrameInProgress = false;
HRESULT LoadDXGI()
{
if (dxgi_dll_ref++ > 0)
@ -602,27 +600,6 @@ void Reset()
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()
{
UINT present_flags = 0;

View File

@ -63,8 +63,6 @@ extern HWND hWnd;
extern bool bFrameInProgress;
void Reset();
bool BeginFrame();
void EndFrame();
void Present();
unsigned int GetBackBufferWidth();

View File

@ -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);
D3D::context->RSSetViewports(1, &vp);
FramebufferManager::BindEFBRenderTarget();
D3D::BeginFrame();
}
Renderer::~Renderer()
{
TeardownDeviceObjects();
D3D::EndFrame();
D3D::Present();
D3D::Close();
}
@ -607,7 +604,6 @@ void Renderer::SwapImpl(AbstractTexture* texture, const EFBRectangle& xfb_region
Renderer::DrawDebugText();
OSD::DrawMessages();
D3D::EndFrame();
g_texture_cache->Cleanup(frameCount);
@ -668,7 +664,6 @@ void Renderer::SwapImpl(AbstractTexture* texture, const EFBRectangle& xfb_region
// begin next frame
RestoreAPIState();
D3D::BeginFrame();
FramebufferManager::BindEFBRenderTarget();
SetViewport();
}