diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-05-21 02:00:17 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:32 +0200 |
commit | a569ac418e232ed631b5a884a1d54aaa619d8341 (patch) | |
tree | 77954dd53ab43316ab726da23c734eafb220b87d /src/shader_recompiler/backend/glasm/emit_context.cpp | |
parent | glasm: Fix InvocationId declaration (diff) | |
download | yuzu-a569ac418e232ed631b5a884a1d54aaa619d8341.tar yuzu-a569ac418e232ed631b5a884a1d54aaa619d8341.tar.gz yuzu-a569ac418e232ed631b5a884a1d54aaa619d8341.tar.bz2 yuzu-a569ac418e232ed631b5a884a1d54aaa619d8341.tar.lz yuzu-a569ac418e232ed631b5a884a1d54aaa619d8341.tar.xz yuzu-a569ac418e232ed631b5a884a1d54aaa619d8341.tar.zst yuzu-a569ac418e232ed631b5a884a1d54aaa619d8341.zip |
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_context.cpp')
-rw-r--r-- | src/shader_recompiler/backend/glasm/emit_context.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_context.cpp b/src/shader_recompiler/backend/glasm/emit_context.cpp index 7b25fa042..bb68b3d19 100644 --- a/src/shader_recompiler/backend/glasm/emit_context.cpp +++ b/src/shader_recompiler/backend/glasm/emit_context.cpp @@ -80,6 +80,24 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile if (info.uses_invocation_id) { Add("ATTRIB primitive_invocation=primitive.invocation;"); } + if (info.stores_tess_level_outer) { + Add("OUTPUT result_patch_tessouter[]={{result.patch.tessouter[0..3]}};"); + } + if (info.stores_tess_level_inner) { + Add("OUTPUT result_patch_tessinner[]={{result.patch.tessinner[0..1]}};"); + } + for (size_t index = 0; index < info.uses_patches.size(); ++index) { + if (!info.uses_patches[index]) { + continue; + } + if (stage == Stage::TessellationEval) { + Add("OUTPUT result_patch_attrib{}[]={{result.patch.attrib[{}..{}]}};", index, index, + index); + } else { + Add("ATTRIB primitive_patch_attrib{}[]={{primitive.patch.attrib[{}..{}]}};", index, + index, index); + } + } for (size_t index = 0; index < program.info.stores_frag_color.size(); ++index) { if (!program.info.stores_frag_color[index]) { continue; |