summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glasm/emit_context.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-30 08:40:19 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:34 +0200
commit916ca7432474e891864524dcbc6c879d5cdbfb72 (patch)
tree07ff6cc3f9737b20b4e65786f94cabe1dd3b254f /src/shader_recompiler/backend/glasm/emit_context.cpp
parentbuffer_cache: Mark uniform buffers as dirty if any enable bit changes (diff)
downloadyuzu-916ca7432474e891864524dcbc6c879d5cdbfb72.tar
yuzu-916ca7432474e891864524dcbc6c879d5cdbfb72.tar.gz
yuzu-916ca7432474e891864524dcbc6c879d5cdbfb72.tar.bz2
yuzu-916ca7432474e891864524dcbc6c879d5cdbfb72.tar.lz
yuzu-916ca7432474e891864524dcbc6c879d5cdbfb72.tar.xz
yuzu-916ca7432474e891864524dcbc6c879d5cdbfb72.tar.zst
yuzu-916ca7432474e891864524dcbc6c879d5cdbfb72.zip
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_context.cpp')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_context.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_context.cpp b/src/shader_recompiler/backend/glasm/emit_context.cpp
index e18526816..08918a5c2 100644
--- a/src/shader_recompiler/backend/glasm/emit_context.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_context.cpp
@@ -117,13 +117,9 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile
index, index);
}
}
- for (size_t index = 0; index < info.stores_frag_color.size(); ++index) {
- if (!info.stores_frag_color[index]) {
- continue;
- }
- if (index == 0) {
- Add("OUTPUT frag_color0=result.color;");
- } else {
+ if (stage == Stage::Fragment) {
+ Add("OUTPUT frag_color0=result.color;");
+ for (size_t index = 1; index < info.stores_frag_color.size(); ++index) {
Add("OUTPUT frag_color{}=result.color[{}];", index, index);
}
}