summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glasm/emit_glasm.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-21 07:12:32 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:33 +0200
commit9e7b6622c25aa858b96bf0f1c7f94223a2f449a2 (patch)
tree48c62889aeb79d6f0f01a467ba0d1ac01dec512b /src/shader_recompiler/backend/glasm/emit_glasm.cpp
parentemit_glasm_context_get_and_set.cpp: Add missing semicolons (diff)
downloadyuzu-9e7b6622c25aa858b96bf0f1c7f94223a2f449a2.tar
yuzu-9e7b6622c25aa858b96bf0f1c7f94223a2f449a2.tar.gz
yuzu-9e7b6622c25aa858b96bf0f1c7f94223a2f449a2.tar.bz2
yuzu-9e7b6622c25aa858b96bf0f1c7f94223a2f449a2.tar.lz
yuzu-9e7b6622c25aa858b96bf0f1c7f94223a2f449a2.tar.xz
yuzu-9e7b6622c25aa858b96bf0f1c7f94223a2f449a2.tar.zst
yuzu-9e7b6622c25aa858b96bf0f1c7f94223a2f449a2.zip
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
index f110fd7f8..edff04a44 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
@@ -374,8 +374,9 @@ std::string_view GetTessSpacing(TessSpacing spacing) {
}
} // Anonymous namespace
-std::string EmitGLASM(const Profile& profile, IR::Program& program, Bindings& bindings) {
- EmitContext ctx{program, bindings, profile};
+std::string EmitGLASM(const Profile& profile, const RuntimeInfo& runtime_info, IR::Program& program,
+ Bindings& bindings) {
+ EmitContext ctx{program, bindings, profile, runtime_info};
Precolor(ctx, program);
EmitCode(ctx, program);
std::string header{StageHeader(program.stage)};
@@ -385,18 +386,18 @@ std::string EmitGLASM(const Profile& profile, IR::Program& program, Bindings& bi
header += fmt::format("VERTICES_OUT {};", program.invocations);
break;
case Stage::TessellationEval:
- header +=
- fmt::format("TESS_MODE {};"
- "TESS_SPACING {};"
- "TESS_VERTEX_ORDER {};",
- GetTessMode(profile.tess_primitive), GetTessSpacing(profile.tess_spacing),
- profile.tess_clockwise ? "CW" : "CCW");
+ header += fmt::format("TESS_MODE {};"
+ "TESS_SPACING {};"
+ "TESS_VERTEX_ORDER {};",
+ GetTessMode(runtime_info.tess_primitive),
+ GetTessSpacing(runtime_info.tess_spacing),
+ runtime_info.tess_clockwise ? "CW" : "CCW");
break;
case Stage::Geometry:
header += fmt::format("PRIMITIVE_IN {};"
"PRIMITIVE_OUT {};"
"VERTICES_OUT {};",
- InputPrimitive(profile.input_topology),
+ InputPrimitive(runtime_info.input_topology),
OutputPrimitive(program.output_topology), program.output_vertices);
break;
case Stage::Compute: