From 302f4085a5f9fd7b5267fd573a8e15f890cfe573 Mon Sep 17 00:00:00 2001 From: Dave Parks <davep@lindenlab.com> Date: Tue, 28 Feb 2012 16:35:50 -0600 Subject: [PATCH] SH-2908 Reset graphics drivers to "low" if viewer crashes when allocating deferred rendering targets. --- indra/newview/pipeline.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index d5bcfe12abe..e2cb22e3075 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -811,6 +811,10 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) if (LLPipeline::sRenderDeferred) { + // Set this flag in case we crash while resizing window or allocating space for deferred rendering targets + gSavedSettings.setBOOL("RenderInitError", TRUE); + gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); + S32 shadow_detail = RenderShadowDetail; BOOL ssao = RenderDeferredSSAO; @@ -872,6 +876,10 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) mShadow[i].release(); } } + + // don't disable shaders on next session + gSavedSettings.setBOOL("RenderInitError", FALSE); + gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); } else { -- GitLab