aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Instructions/InstEmitFlowControl.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Shader/Instructions/InstEmitFlowControl.cs')
-rw-r--r--Ryujinx.Graphics.Shader/Instructions/InstEmitFlowControl.cs19
1 files changed, 18 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Shader/Instructions/InstEmitFlowControl.cs b/Ryujinx.Graphics.Shader/Instructions/InstEmitFlowControl.cs
index fce951ba..da34c1be 100644
--- a/Ryujinx.Graphics.Shader/Instructions/InstEmitFlowControl.cs
+++ b/Ryujinx.Graphics.Shader/Instructions/InstEmitFlowControl.cs
@@ -67,7 +67,24 @@ namespace Ryujinx.Graphics.Shader.Instructions
{
InstCal op = context.GetOp<InstCal>();
- context.Call(context.GetFunctionId(context.CurrOp.GetAbsoluteAddress()), false);
+ DecodedFunction function = context.Program.GetFunctionByAddress(context.CurrOp.GetAbsoluteAddress());
+
+ if (function.IsCompilerGenerated)
+ {
+ switch (function.Type)
+ {
+ case FunctionType.BuiltInFSIBegin:
+ context.FSIBegin();
+ break;
+ case FunctionType.BuiltInFSIEnd:
+ context.FSIEnd();
+ break;
+ }
+ }
+ else
+ {
+ context.Call(function.Id, false);
+ }
}
public static void Exit(EmitterContext context)