diff options
| author | 2021-05-20 21:00:17 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:32 -0400 | |
| commit | a569ac418e232ed631b5a884a1d54aaa619d8341 (patch) | |
| tree | 77954dd53ab43316ab726da23c734eafb220b87d /src/shader_recompiler/backend/glasm/emit_context.cpp | |
| parent | glasm: Fix InvocationId declaration (diff) | |
| download | yuzu-a569ac418e232ed631b5a884a1d54aaa619d8341.tar.gz yuzu-a569ac418e232ed631b5a884a1d54aaa619d8341.tar.xz yuzu-a569ac418e232ed631b5a884a1d54aaa619d8341.zip | |
glasm: Implement patch memory
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 | |||
| 80 | if (info.uses_invocation_id) { | 80 | if (info.uses_invocation_id) { |
| 81 | Add("ATTRIB primitive_invocation=primitive.invocation;"); | 81 | Add("ATTRIB primitive_invocation=primitive.invocation;"); |
| 82 | } | 82 | } |
| 83 | if (info.stores_tess_level_outer) { | ||
| 84 | Add("OUTPUT result_patch_tessouter[]={{result.patch.tessouter[0..3]}};"); | ||
| 85 | } | ||
| 86 | if (info.stores_tess_level_inner) { | ||
| 87 | Add("OUTPUT result_patch_tessinner[]={{result.patch.tessinner[0..1]}};"); | ||
| 88 | } | ||
| 89 | for (size_t index = 0; index < info.uses_patches.size(); ++index) { | ||
| 90 | if (!info.uses_patches[index]) { | ||
| 91 | continue; | ||
| 92 | } | ||
| 93 | if (stage == Stage::TessellationEval) { | ||
| 94 | Add("OUTPUT result_patch_attrib{}[]={{result.patch.attrib[{}..{}]}};", index, index, | ||
| 95 | index); | ||
| 96 | } else { | ||
| 97 | Add("ATTRIB primitive_patch_attrib{}[]={{primitive.patch.attrib[{}..{}]}};", index, | ||
| 98 | index, index); | ||
| 99 | } | ||
| 100 | } | ||
| 83 | for (size_t index = 0; index < program.info.stores_frag_color.size(); ++index) { | 101 | for (size_t index = 0; index < program.info.stores_frag_color.size(); ++index) { |
| 84 | if (!program.info.stores_frag_color[index]) { | 102 | if (!program.info.stores_frag_color[index]) { |
| 85 | continue; | 103 | continue; |