diff options
| author | 2021-05-14 00:40:54 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:31 -0400 | |
| commit | d54d7de40e7295827b0e4e4026441b53d3fc9569 (patch) | |
| tree | 29b5074f851292dace7aeb5da7716675544b3735 /src/shader_recompiler/frontend/maxwell/translate/translate.cpp | |
| parent | glasm: Implement Storage atomics (diff) | |
| download | yuzu-d54d7de40e7295827b0e4e4026441b53d3fc9569.tar.gz yuzu-d54d7de40e7295827b0e4e4026441b53d3fc9569.tar.xz yuzu-d54d7de40e7295827b0e4e4026441b53d3fc9569.zip | |
glasm: Rework control flow introducing a syntax list
This commit regresses VertexA shaders, their transformation pass has to
be adapted to the new control flow.
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/translate/translate.cpp')
| -rw-r--r-- | src/shader_recompiler/frontend/maxwell/translate/translate.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate/translate.cpp b/src/shader_recompiler/frontend/maxwell/translate/translate.cpp index f1230f58f..0f4e7a251 100644 --- a/src/shader_recompiler/frontend/maxwell/translate/translate.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate/translate.cpp | |||
| @@ -23,13 +23,12 @@ static void Invoke(TranslatorVisitor& visitor, Location pc, u64 insn) { | |||
| 23 | } | 23 | } |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | void Translate(Environment& env, IR::Block* block) { | 26 | void Translate(Environment& env, IR::Block* block, u32 location_begin, u32 location_end) { |
| 27 | if (block->IsVirtual()) { | 27 | if (location_begin == location_end) { |
| 28 | return; | 28 | return; |
| 29 | } | 29 | } |
| 30 | TranslatorVisitor visitor{env, *block}; | 30 | TranslatorVisitor visitor{env, *block}; |
| 31 | const Location pc_end{block->LocationEnd()}; | 31 | for (Location pc = location_begin; pc != location_end; ++pc) { |
| 32 | for (Location pc = block->LocationBegin(); pc != pc_end; ++pc) { | ||
| 33 | const u64 insn{env.ReadInstruction(pc.Offset())}; | 32 | const u64 insn{env.ReadInstruction(pc.Offset())}; |
| 34 | const Opcode opcode{Decode(insn)}; | 33 | const Opcode opcode{Decode(insn)}; |
| 35 | switch (opcode) { | 34 | switch (opcode) { |