diff options
| author | 2021-05-21 03:02:06 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:33 -0400 | |
| commit | 7dadb2bef3bd7f1038c61cb67c4248e1f7f324df (patch) | |
| tree | 66fa91fa20989b6b1ac5da8a2c427d163f65955f /src/shader_recompiler/backend | |
| parent | glasm: Fix output patch reads (diff) | |
| download | yuzu-7dadb2bef3bd7f1038c61cb67c4248e1f7f324df.tar.gz yuzu-7dadb2bef3bd7f1038c61cb67c4248e1f7f324df.tar.xz yuzu-7dadb2bef3bd7f1038c61cb67c4248e1f7f324df.zip | |
glasm: Simplify patch reads
Diffstat (limited to 'src/shader_recompiler/backend')
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp index 97b0e7409..14fdc88f6 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp | |||
| @@ -163,11 +163,8 @@ void EmitGetPatch(EmitContext& ctx, IR::Inst& inst, IR::Patch patch) { | |||
| 163 | const u32 index{IR::GenericPatchIndex(patch)}; | 163 | const u32 index{IR::GenericPatchIndex(patch)}; |
| 164 | const u32 element{IR::GenericPatchElement(patch)}; | 164 | const u32 element{IR::GenericPatchElement(patch)}; |
| 165 | const char swizzle{"xyzw"[element]}; | 165 | const char swizzle{"xyzw"[element]}; |
| 166 | if (ctx.stage == Stage::TessellationControl) { | 166 | const std::string_view out{ctx.stage == Stage::TessellationControl ? ".out" : ""}; |
| 167 | ctx.Add("MOV.F {},primitive.out.patch.attrib[{}].{};", inst, index, swizzle); | 167 | ctx.Add("MOV.F {},primitive{}.patch.attrib[{}].{};", inst, out, index, swizzle); |
| 168 | } else { | ||
| 169 | ctx.Add("MOV.F {},primitive.patch.attrib[{}].{};", inst, index, swizzle); | ||
| 170 | } | ||
| 171 | } | 168 | } |
| 172 | 169 | ||
| 173 | void EmitSetPatch(EmitContext& ctx, IR::Patch patch, ScalarF32 value) { | 170 | void EmitSetPatch(EmitContext& ctx, IR::Patch patch, ScalarF32 value) { |