summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glasm/emit_context.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-06-24 22:40:24 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:39 +0200
commit8a3427a4c857aa08e365d1776d1f0d9f32639c9c (patch)
tree6436b8973fe9f97c131aea892885b61215b67e01 /src/shader_recompiler/backend/glasm/emit_context.cpp
parentshader: Rework varyings and implement passthrough geometry shaders (diff)
downloadyuzu-8a3427a4c857aa08e365d1776d1f0d9f32639c9c.tar
yuzu-8a3427a4c857aa08e365d1776d1f0d9f32639c9c.tar.gz
yuzu-8a3427a4c857aa08e365d1776d1f0d9f32639c9c.tar.bz2
yuzu-8a3427a4c857aa08e365d1776d1f0d9f32639c9c.tar.lz
yuzu-8a3427a4c857aa08e365d1776d1f0d9f32639c9c.tar.xz
yuzu-8a3427a4c857aa08e365d1776d1f0d9f32639c9c.tar.zst
yuzu-8a3427a4c857aa08e365d1776d1f0d9f32639c9c.zip
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_context.cpp')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_context.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_context.cpp b/src/shader_recompiler/backend/glasm/emit_context.cpp
index 80dad9ff3..069c019ad 100644
--- a/src/shader_recompiler/backend/glasm/emit_context.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_context.cpp
@@ -83,13 +83,14 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile
break;
}
const std::string_view attr_stage{stage == Stage::Fragment ? "fragment" : "vertex"};
+ const VaryingState loads{info.loads.mask | info.passthrough.mask};
for (size_t index = 0; index < IR::NUM_GENERICS; ++index) {
- if (info.loads.Generic(index)) {
+ if (loads.Generic(index)) {
Add("{}ATTRIB in_attr{}[]={{{}.attrib[{}..{}]}};",
InterpDecorator(info.interpolation[index]), index, attr_stage, index, index);
}
}
- if (IsInputArray(stage) && info.loads.AnyComponent(IR::Attribute::PositionX)) {
+ if (IsInputArray(stage) && loads.AnyComponent(IR::Attribute::PositionX)) {
Add("ATTRIB vertex_position=vertex.position;");
}
if (info.uses_invocation_id) {