diff --git a/Source/Core/VideoCommon/Src/BPFunctions.cpp b/Source/Core/VideoCommon/Src/BPFunctions.cpp index ba0c1db519..a78f12c21a 100644 --- a/Source/Core/VideoCommon/Src/BPFunctions.cpp +++ b/Source/Core/VideoCommon/Src/BPFunctions.cpp @@ -197,11 +197,6 @@ skip: Renderer::StorePixelFormat(new_format); } -void RestoreRenderState(const BPCmd &bp) -{ - g_renderer->RestoreAPIState(); -} - bool GetConfig(const int &type) { switch (type) diff --git a/Source/Core/VideoCommon/Src/BPFunctions.h b/Source/Core/VideoCommon/Src/BPFunctions.h index b3bc916910..b38681a1b9 100644 --- a/Source/Core/VideoCommon/Src/BPFunctions.h +++ b/Source/Core/VideoCommon/Src/BPFunctions.h @@ -48,7 +48,6 @@ void SetColorMask(const BPCmd &bp); void CopyEFB(const BPCmd &bp, const EFBRectangle &rc, const u32 &address, const bool &fromZBuffer, const bool &isIntensityFmt, const u32 ©fmt, const int &scaleByHalf); void ClearScreen(const BPCmd &bp, const EFBRectangle &rc); void OnPixelFormatChange(const BPCmd &bp); -void RestoreRenderState(const BPCmd &bp); u8 *GetPointer(const u32 &address); bool GetConfig(const int &type); void SetTextureMode(const BPCmd &bp); diff --git a/Source/Core/VideoCommon/Src/BPStructs.cpp b/Source/Core/VideoCommon/Src/BPStructs.cpp index 139d32fc09..e32871427b 100644 --- a/Source/Core/VideoCommon/Src/BPStructs.cpp +++ b/Source/Core/VideoCommon/Src/BPStructs.cpp @@ -290,8 +290,6 @@ void BPWritten(const BPCmd& bp) ClearScreen(bp, rc); } - RestoreRenderState(bp); // TODO: Remove this call, handle this in the plugins instead - break; } case BPMEM_LOADTLUT0: // This one updates bpmem.tlutXferSrc, no need to do anything here. diff --git a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp index 7059130d73..44879758c6 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp @@ -62,8 +62,6 @@ struct D3D11_RASTERIZER_DESC rastdc; } gx_state; -bool reset_called = false; - // State translation lookup tables static const D3D11_BLEND d3dSrcFactors[8] = { @@ -381,8 +379,6 @@ Renderer::Renderer() D3D::context->RSSetViewports(1, &vp); D3D::context->OMSetRenderTargets(1, &FramebufferManager::GetEFBColorTexture()->GetRTV(), FramebufferManager::GetEFBDepthTexture()->GetDSV()); D3D::BeginFrame(); - - reset_called = false; } Renderer::~Renderer() @@ -1134,21 +1130,16 @@ void Renderer::ResetAPIState() D3D::stateman->PushBlendState(resetblendstate); D3D::stateman->PushDepthState(resetdepthstate); D3D::stateman->PushRasterizerState(resetraststate); - reset_called = true; } void Renderer::RestoreAPIState() { // Gets us back into a more game-like state. - if (reset_called) - { - D3D::stateman->PopBlendState(); - D3D::stateman->PopDepthState(); - D3D::stateman->PopRasterizerState(); - } + D3D::stateman->PopBlendState(); + D3D::stateman->PopDepthState(); + D3D::stateman->PopRasterizerState(); UpdateViewport(); SetScissorRect(); - reset_called = false; } void Renderer::ApplyState(bool bUseDstAlpha)