Merge shader branch, adding support for GLSL decompilation, a macro
interpreter, and a rewrite of the GPU code.
This commit is contained in:
parent
7acd0e0122
commit
b9aa3966c0
77 changed files with 5301 additions and 766 deletions
|
@ -1,5 +1,5 @@
|
|||
using ChocolArm64.Memory;
|
||||
using Ryujinx.Graphics.Gal;
|
||||
using System.Threading;
|
||||
|
||||
namespace Ryujinx.Graphics.Gpu
|
||||
{
|
||||
|
@ -9,7 +9,13 @@ namespace Ryujinx.Graphics.Gpu
|
|||
|
||||
internal NsGpuMemoryMgr MemoryMgr { get; private set; }
|
||||
|
||||
internal NsGpuPGraph PGraph { get; private set; }
|
||||
public NvGpuFifo Fifo;
|
||||
|
||||
internal NvGpuEngine3d Engine3d;
|
||||
|
||||
private Thread FifoProcessing;
|
||||
|
||||
private bool KeepRunning;
|
||||
|
||||
public NsGpu(IGalRenderer Renderer)
|
||||
{
|
||||
|
@ -17,7 +23,15 @@ namespace Ryujinx.Graphics.Gpu
|
|||
|
||||
MemoryMgr = new NsGpuMemoryMgr();
|
||||
|
||||
PGraph = new NsGpuPGraph(this);
|
||||
Fifo = new NvGpuFifo(this);
|
||||
|
||||
Engine3d = new NvGpuEngine3d(this);
|
||||
|
||||
KeepRunning = true;
|
||||
|
||||
FifoProcessing = new Thread(ProcessFifo);
|
||||
|
||||
FifoProcessing.Start();
|
||||
}
|
||||
|
||||
public long GetCpuAddr(long Position)
|
||||
|
@ -35,11 +49,6 @@ namespace Ryujinx.Graphics.Gpu
|
|||
return MemoryMgr.Map(CpuAddr, GpuAddr, Size);
|
||||
}
|
||||
|
||||
public void ProcessPushBuffer(NsGpuPBEntry[] PushBuffer, AMemory Memory)
|
||||
{
|
||||
PGraph.ProcessPushBuffer(PushBuffer, Memory);
|
||||
}
|
||||
|
||||
public long ReserveMemory(long Size, long Align)
|
||||
{
|
||||
return MemoryMgr.Reserve(Size, Align);
|
||||
|
@ -49,5 +58,15 @@ namespace Ryujinx.Graphics.Gpu
|
|||
{
|
||||
return MemoryMgr.Reserve(GpuAddr, Size, Align);
|
||||
}
|
||||
|
||||
private void ProcessFifo()
|
||||
{
|
||||
while (KeepRunning)
|
||||
{
|
||||
Fifo.DispatchCalls();
|
||||
|
||||
Thread.Yield();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue