|
@@ -1,4 +1,3 @@
|
|
|
-using Ryujinx.HLE.Gpu.Exceptions;
|
|
|
|
|
using Ryujinx.HLE.Gpu.Memory;
|
|
using Ryujinx.HLE.Gpu.Memory;
|
|
|
using System;
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
@@ -7,10 +6,6 @@ namespace Ryujinx.HLE.Gpu.Engines
|
|
|
{
|
|
{
|
|
|
class MacroInterpreter
|
|
class MacroInterpreter
|
|
|
{
|
|
{
|
|
|
- private const int MaxCallCountPerRun = 500;
|
|
|
|
|
-
|
|
|
|
|
- private int CallCount;
|
|
|
|
|
-
|
|
|
|
|
private enum AssignmentOperation
|
|
private enum AssignmentOperation
|
|
|
{
|
|
{
|
|
|
IgnoreAndFetch = 0,
|
|
IgnoreAndFetch = 0,
|
|
@@ -102,8 +97,6 @@ namespace Ryujinx.HLE.Gpu.Engines
|
|
|
MethIncr = 0;
|
|
MethIncr = 0;
|
|
|
|
|
|
|
|
Carry = false;
|
|
Carry = false;
|
|
|
-
|
|
|
|
|
- CallCount = 0;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private bool Step(NvGpuVmm Vmm, int[] Mme)
|
|
private bool Step(NvGpuVmm Vmm, int[] Mme)
|
|
@@ -415,15 +408,6 @@ namespace Ryujinx.HLE.Gpu.Engines
|
|
|
|
|
|
|
|
private void Send(NvGpuVmm Vmm, int Value)
|
|
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);
|
|
NvGpuPBEntry PBEntry = new NvGpuPBEntry(MethAddr, 0, Value);
|
|
|
|
|
|
|
|
Engine.CallMethod(Vmm, PBEntry);
|
|
Engine.CallMethod(Vmm, PBEntry);
|