From d58e389f6782a1e548e5191d5a238ddd9ddfe3e0 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Sun, 16 Nov 2014 13:55:28 +0100 Subject: [PATCH] D3D: Recreate the framebuffer when stereoscopic 3D is toggled. --- Source/Core/VideoBackends/D3D/Render.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp index 09355ca851..0cd5835b60 100644 --- a/Source/Core/VideoBackends/D3D/Render.cpp +++ b/Source/Core/VideoBackends/D3D/Render.cpp @@ -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);