summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glasm/emit_glasm.cpp
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/glasm/emit_glasm.cpp
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/glasm/emit_glasm.cpp')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
index e23208d2c..70ca6f621 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
@@ -298,8 +298,7 @@ void SetupOptions(const IR::Program& program, const Profile& profile,
298 if (stage == Stage::Fragment && runtime_info.force_early_z != 0) { 298 if (stage == Stage::Fragment && runtime_info.force_early_z != 0) {
299 header += "OPTION NV_early_fragment_tests;"; 299 header += "OPTION NV_early_fragment_tests;";
300 } 300 }
301 const auto non_zero_frag_colors{info.stores_frag_color | std::views::drop(1)}; 301 if (stage == Stage::Fragment) {
302 if (std::ranges::find(non_zero_frag_colors, true) != non_zero_frag_colors.end()) {
303 header += "OPTION ARB_draw_buffers;"; 302 header += "OPTION ARB_draw_buffers;";
304 } 303 }
305} 304}