From 12ef06ba8bca5b20069e24b36f9216d01d4fe904 Mon Sep 17 00:00:00 2001
From: ameerj <52414509+ameerj@users.noreply.github.com>
Date: Tue, 15 Jun 2021 21:01:44 -0400
Subject: glsl: Obey need_declared_frag_colors to declare and initialize all
 frag_color

Fixes Ori and the blind forest title screen
---
 src/shader_recompiler/backend/glsl/emit_context.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/shader_recompiler/backend/glsl/emit_context.cpp')

diff --git a/src/shader_recompiler/backend/glsl/emit_context.cpp b/src/shader_recompiler/backend/glsl/emit_context.cpp
index d224c4d845..54aa88b63b 100644
--- a/src/shader_recompiler/backend/glsl/emit_context.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_context.cpp
@@ -340,7 +340,7 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile
         header += fmt::format("layout(location={})patch {} vec4 patch{};", index, qualifier, index);
     }
     for (size_t index = 0; index < info.stores_frag_color.size(); ++index) {
-        if (!info.stores_frag_color[index]) {
+        if (!info.stores_frag_color[index] && !profile.need_declared_frag_colors) {
             continue;
         }
         header += fmt::format("layout(location={})out vec4 frag_color{};", index, index);
-- 
cgit v1.2.3-70-g09d2