mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-18 01:27:58 -05:00
shader_ir: Unify blocks in decompiled shaders.
This commit is contained in:
committed by
FernandoS27
parent
926b80102f
commit
d5533b440c
@ -191,10 +191,12 @@ public:
|
||||
|
||||
// TODO(Subv): Figure out the actual depth of the flow stack, for now it seems
|
||||
// unlikely that shaders will use 20 nested SSYs and PBKs.
|
||||
constexpr u32 FLOW_STACK_SIZE = 20;
|
||||
for (const auto stack : std::array{MetaStackClass::Ssy, MetaStackClass::Pbk}) {
|
||||
code.AddLine("uint {}[{}];", FlowStackName(stack), FLOW_STACK_SIZE);
|
||||
code.AddLine("uint {} = 0u;", FlowStackTopName(stack));
|
||||
if (!ir.IsFlowStackDisabled()) {
|
||||
constexpr u32 FLOW_STACK_SIZE = 20;
|
||||
for (const auto stack : std::array{MetaStackClass::Ssy, MetaStackClass::Pbk}) {
|
||||
code.AddLine("uint {}[{}];", FlowStackName(stack), FLOW_STACK_SIZE);
|
||||
code.AddLine("uint {} = 0u;", FlowStackTopName(stack));
|
||||
}
|
||||
}
|
||||
|
||||
code.AddLine("while (true) {{");
|
||||
|
Reference in New Issue
Block a user