D3D: Recreate the framebuffer when stereoscopic 3D is toggled.

This commit is contained in:
Jules Blok 2014-11-16 13:55:28 +01:00
parent b769da23d0
commit d58e389f67

View File

@ -47,6 +47,7 @@ static u32 s_LastAA = 0;
static Television s_television;
static bool s_last_fullscreen_mode = false;
static bool s_LastStereo = 0;
ID3D11Buffer* access_efb_cbuf = nullptr;
ID3D11BlendState* clearblendstates[4] = {nullptr};
@ -229,6 +230,7 @@ Renderer::Renderer(void *&window_handle)
s_LastAA = g_ActiveConfig.iMultisampleMode;
s_LastEFBScale = g_ActiveConfig.iEFBScale;
s_last_fullscreen_mode = g_ActiveConfig.bFullscreen;
s_LastStereo = g_ActiveConfig.iStereoMode > 0;
CalculateTargetSize(s_backbuffer_width, s_backbuffer_height);
SetupDeviceObjects();
@ -1007,7 +1009,8 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
windowResized ||
fullscreen_changed ||
s_LastEFBScale != g_ActiveConfig.iEFBScale ||
s_LastAA != g_ActiveConfig.iMultisampleMode)
s_LastAA != g_ActiveConfig.iMultisampleMode ||
s_LastStereo != (g_ActiveConfig.iStereoMode > 0))
{
s_LastAA = g_ActiveConfig.iMultisampleMode;
PixelShaderCache::InvalidateMSAAShaders();
@ -1038,6 +1041,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
s_LastEFBScale = g_ActiveConfig.iEFBScale;
s_LastStereo = g_ActiveConfig.iStereoMode > 0;
CalculateTargetSize(s_backbuffer_width, s_backbuffer_height);
D3D::context->OMSetRenderTargets(1, &D3D::GetBackBuffer()->GetRTV(), nullptr);