diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp index de86dff177..f32fa7edca 100644 --- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp +++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp @@ -220,7 +220,7 @@ SHADER* ProgramShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode, u32 components filename = StringFromFormat("%sps_%04i.txt", File::GetUserPath(D_DUMP_IDX).c_str(), counter++); SaveData(filename, pcode.GetBuffer()); - if (g_ActiveConfig.bStereo) + if (gcode.GetBuffer() != nullptr) { filename = StringFromFormat("%sgs_%04i.txt", File::GetUserPath(D_DUMP_IDX).c_str(), counter++); SaveData(filename, gcode.GetBuffer()); @@ -387,8 +387,7 @@ void ProgramShaderCache::GetShaderId(SHADERUID* uid, DSTALPHA_MODE dstAlphaMode, { GetPixelShaderUid(uid->puid, dstAlphaMode, API_OPENGL, components); GetVertexShaderUid(uid->vuid, components, API_OPENGL); - if (g_ActiveConfig.bStereo) - GetGeometryShaderUid(uid->guid, components, API_OPENGL); + GetGeometryShaderUid(uid->guid, components, API_OPENGL); if (g_ActiveConfig.bEnableShaderDebugging) { diff --git a/Source/Core/VideoCommon/GeometryShaderGen.cpp b/Source/Core/VideoCommon/GeometryShaderGen.cpp index 6a39e2ca1d..a247899d5c 100644 --- a/Source/Core/VideoCommon/GeometryShaderGen.cpp +++ b/Source/Core/VideoCommon/GeometryShaderGen.cpp @@ -41,10 +41,10 @@ static inline void GenerateGeometryShader(T& out, u32 components, API_TYPE ApiTy out.Write("//Geometry Shader for 3D stereoscopy\n"); + uid_data->stereo = g_ActiveConfig.bStereo; if (ApiType == API_OPENGL) { // Insert layout parameters - uid_data->stereo = g_ActiveConfig.bStereo; if (g_ActiveConfig.backend_info.bSupportsGSInstancing) out.Write("layout(triangles, invocations = %d) in;\n", g_ActiveConfig.bStereo ? 2 : 1); else