From 182d716867ae477c2b15a5332430dc2641fa1cc3 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Thu, 16 Aug 2018 20:45:00 -0300 Subject: [PATCH] Remove artificial call count limit for EndGl (#357) --- Ryujinx.HLE/Gpu/Engines/MacroInterpreter.cs | 16 ---------------- Ryujinx.HLE/Gpu/Exceptions/GpuException.cs | 11 ----------- Ryujinx.HLE/Gpu/Exceptions/GpuExceptionHelper.cs | 12 ------------ 3 files changed, 39 deletions(-) delete mode 100644 Ryujinx.HLE/Gpu/Exceptions/GpuException.cs delete mode 100644 Ryujinx.HLE/Gpu/Exceptions/GpuExceptionHelper.cs diff --git a/Ryujinx.HLE/Gpu/Engines/MacroInterpreter.cs b/Ryujinx.HLE/Gpu/Engines/MacroInterpreter.cs index aef2eb4c8a..423e20213d 100644 --- a/Ryujinx.HLE/Gpu/Engines/MacroInterpreter.cs +++ b/Ryujinx.HLE/Gpu/Engines/MacroInterpreter.cs @@ -1,4 +1,3 @@ -using Ryujinx.HLE.Gpu.Exceptions; using Ryujinx.HLE.Gpu.Memory; using System; using System.Collections.Generic; @@ -7,10 +6,6 @@ namespace Ryujinx.HLE.Gpu.Engines { class MacroInterpreter { - private const int MaxCallCountPerRun = 500; - - private int CallCount; - private enum AssignmentOperation { IgnoreAndFetch = 0, @@ -102,8 +97,6 @@ namespace Ryujinx.HLE.Gpu.Engines MethIncr = 0; Carry = false; - - CallCount = 0; } private bool Step(NvGpuVmm Vmm, int[] Mme) @@ -415,15 +408,6 @@ namespace Ryujinx.HLE.Gpu.Engines private void Send(NvGpuVmm Vmm, int Value) { - //This is an artificial limit that prevents excessive calls - //to VertexEndGl since that triggers rendering, and in the - //case that something is bugged and causes an absurd amount of - //draw calls, this prevents the system from freezing (and throws instead). - if (MethAddr == 0x585 && ++CallCount > MaxCallCountPerRun) - { - GpuExceptionHelper.ThrowCallCoundExceeded(); - } - NvGpuPBEntry PBEntry = new NvGpuPBEntry(MethAddr, 0, Value); Engine.CallMethod(Vmm, PBEntry); diff --git a/Ryujinx.HLE/Gpu/Exceptions/GpuException.cs b/Ryujinx.HLE/Gpu/Exceptions/GpuException.cs deleted file mode 100644 index c0bce5a52c..0000000000 --- a/Ryujinx.HLE/Gpu/Exceptions/GpuException.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace Ryujinx.HLE.Gpu.Exceptions -{ - class GpuException : Exception - { - public GpuException() : base() { } - - public GpuException(string ExMsg) : base(ExMsg) { } - } -} \ No newline at end of file diff --git a/Ryujinx.HLE/Gpu/Exceptions/GpuExceptionHelper.cs b/Ryujinx.HLE/Gpu/Exceptions/GpuExceptionHelper.cs deleted file mode 100644 index aeab9a291a..0000000000 --- a/Ryujinx.HLE/Gpu/Exceptions/GpuExceptionHelper.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Ryujinx.HLE.Gpu.Exceptions -{ - static class GpuExceptionHelper - { - private const string CallCountExceeded = "Method call count exceeded the limit allowed per run!"; - - public static void ThrowCallCoundExceeded() - { - throw new GpuException(CallCountExceeded); - } - } -} \ No newline at end of file