summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glasm/emit_context.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-10 23:21:28 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:31 +0200
commitc4fd6b55bc9acd06b2fc89f84fd175d78e14110a (patch)
treec246a1c64f4826faedcf5c93be778116e48caf85 /src/shader_recompiler/backend/glasm/emit_context.cpp
parentglasm: Add MUFU instructions to GLASM (diff)
downloadyuzu-c4fd6b55bc9acd06b2fc89f84fd175d78e14110a.tar
yuzu-c4fd6b55bc9acd06b2fc89f84fd175d78e14110a.tar.gz
yuzu-c4fd6b55bc9acd06b2fc89f84fd175d78e14110a.tar.bz2
yuzu-c4fd6b55bc9acd06b2fc89f84fd175d78e14110a.tar.lz
yuzu-c4fd6b55bc9acd06b2fc89f84fd175d78e14110a.tar.xz
yuzu-c4fd6b55bc9acd06b2fc89f84fd175d78e14110a.tar.zst
yuzu-c4fd6b55bc9acd06b2fc89f84fd175d78e14110a.zip
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_context.cpp')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_context.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_context.cpp b/src/shader_recompiler/backend/glasm/emit_context.cpp
index 9f839f3bf..f9d83dd91 100644
--- a/src/shader_recompiler/backend/glasm/emit_context.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_context.cpp
@@ -25,6 +25,23 @@ EmitContext::EmitContext(IR::Program& program) {
if (const size_t num = program.info.storage_buffers_descriptors.size(); num > 0) {
Add("PARAM c[{}]={{program.local[0..{}]}};", num, num - 1);
}
+ switch (program.stage) {
+ case Stage::VertexA:
+ case Stage::VertexB:
+ stage_name = "vertex";
+ break;
+ case Stage::TessellationControl:
+ case Stage::TessellationEval:
+ case Stage::Geometry:
+ stage_name = "primitive";
+ break;
+ case Stage::Fragment:
+ stage_name = "fragment";
+ break;
+ case Stage::Compute:
+ stage_name = "compute";
+ break;
+ }
}
} // namespace Shader::Backend::GLASM