mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-16 14:27:56 -05:00
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.
This commit is contained in:
@ -23,13 +23,12 @@ static void Invoke(TranslatorVisitor& visitor, Location pc, u64 insn) {
|
||||
}
|
||||
}
|
||||
|
||||
void Translate(Environment& env, IR::Block* block) {
|
||||
if (block->IsVirtual()) {
|
||||
void Translate(Environment& env, IR::Block* block, u32 location_begin, u32 location_end) {
|
||||
if (location_begin == location_end) {
|
||||
return;
|
||||
}
|
||||
TranslatorVisitor visitor{env, *block};
|
||||
const Location pc_end{block->LocationEnd()};
|
||||
for (Location pc = block->LocationBegin(); pc != pc_end; ++pc) {
|
||||
for (Location pc = location_begin; pc != location_end; ++pc) {
|
||||
const u64 insn{env.ReadInstruction(pc.Offset())};
|
||||
const Opcode opcode{Decode(insn)};
|
||||
switch (opcode) {
|
||||
|
@ -9,6 +9,6 @@
|
||||
|
||||
namespace Shader::Maxwell {
|
||||
|
||||
void Translate(Environment& env, IR::Block* block);
|
||||
void Translate(Environment& env, IR::Block* block, u32 location_begin, u32 location_end);
|
||||
|
||||
} // namespace Shader::Maxwell
|
||||
|
Reference in New Issue
Block a user