summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/spirv
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-05-30 03:40:19 -0300
committerGravatar ameerj2021-07-22 21:51:34 -0400
commit916ca7432474e891864524dcbc6c879d5cdbfb72 (patch)
tree07ff6cc3f9737b20b4e65786f94cabe1dd3b254f /src/shader_recompiler/backend/spirv
parentbuffer_cache: Mark uniform buffers as dirty if any enable bit changes (diff)
downloadyuzu-916ca7432474e891864524dcbc6c879d5cdbfb72.tar.gz
yuzu-916ca7432474e891864524dcbc6c879d5cdbfb72.tar.xz
yuzu-916ca7432474e891864524dcbc6c879d5cdbfb72.zip
opengl: Declare fragment outputs even if they are not used
Fixes Ori and the Blind Forest's menu on GLASM. For some reason (probably high level optimizations) it is not sanitized on SPIR-V for OpenGL. Vulkan is unaffected by this change.
Diffstat (limited to 'src/shader_recompiler/backend/spirv')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_context.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_context.cpp b/src/shader_recompiler/backend/spirv/emit_context.cpp
index 3e8899f53..7c618125e 100644
--- a/src/shader_recompiler/backend/spirv/emit_context.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_context.cpp
@@ -1320,7 +1320,7 @@ void EmitContext::DefineOutputs(const IR::Program& program) {
1320 break; 1320 break;
1321 case Stage::Fragment: 1321 case Stage::Fragment:
1322 for (u32 index = 0; index < 8; ++index) { 1322 for (u32 index = 0; index < 8; ++index) {
1323 if (!info.stores_frag_color[index]) { 1323 if (!info.stores_frag_color[index] && !profile.need_declared_frag_colors) {
1324 continue; 1324 continue;
1325 } 1325 }
1326 frag_color[index] = DefineOutput(*this, F32[4], std::nullopt); 1326 frag_color[index] = DefineOutput(*this, F32[4], std::nullopt);