summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glasm/emit_context.cpp
diff options
context:
space:
mode:
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
83 break; 83 break;
84 } 84 }
85 const std::string_view attr_stage{stage == Stage::Fragment ? "fragment" : "vertex"}; 85 const std::string_view attr_stage{stage == Stage::Fragment ? "fragment" : "vertex"};
86 const VaryingState loads{info.loads.mask | info.passthrough.mask};
86 for (size_t index = 0; index < IR::NUM_GENERICS; ++index) { 87 for (size_t index = 0; index < IR::NUM_GENERICS; ++index) {
87 if (info.loads.Generic(index)) { 88 if (loads.Generic(index)) {
88 Add("{}ATTRIB in_attr{}[]={{{}.attrib[{}..{}]}};", 89 Add("{}ATTRIB in_attr{}[]={{{}.attrib[{}..{}]}};",
89 InterpDecorator(info.interpolation[index]), index, attr_stage, index, index); 90 InterpDecorator(info.interpolation[index]), index, attr_stage, index, index);
90 } 91 }
91 } 92 }
92 if (IsInputArray(stage) && info.loads.AnyComponent(IR::Attribute::PositionX)) { 93 if (IsInputArray(stage) && loads.AnyComponent(IR::Attribute::PositionX)) {
93 Add("ATTRIB vertex_position=vertex.position;"); 94 Add("ATTRIB vertex_position=vertex.position;");
94 } 95 }
95 if (info.uses_invocation_id) { 96 if (info.uses_invocation_id) {