mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-26 18:01:21 -08:00
231fae1a4c
* Initial implementation of the texture cache * Cache vertex and index data aswell, some cleanup * Improve handling of the cache by storing cached ranges on a list for each page * Delete old data from the caches automatically, ensure that the cache is cleaned when the mapping/size changes, and some general cleanup
45 lines
972 B
C#
45 lines
972 B
C#
using Ryujinx.Graphics.Gal;
|
|
using System.Threading;
|
|
|
|
namespace Ryujinx.Core.Gpu
|
|
{
|
|
class NvGpu
|
|
{
|
|
public IGalRenderer Renderer { get; private set; }
|
|
|
|
public NvGpuFifo Fifo { get; private set; }
|
|
|
|
public NvGpuEngine2d Engine2d { get; private set; }
|
|
public NvGpuEngine3d Engine3d { get; private set; }
|
|
|
|
private Thread FifoProcessing;
|
|
|
|
private bool KeepRunning;
|
|
|
|
public NvGpu(IGalRenderer Renderer)
|
|
{
|
|
this.Renderer = Renderer;
|
|
|
|
Fifo = new NvGpuFifo(this);
|
|
|
|
Engine2d = new NvGpuEngine2d(this);
|
|
Engine3d = new NvGpuEngine3d(this);
|
|
|
|
KeepRunning = true;
|
|
|
|
FifoProcessing = new Thread(ProcessFifo);
|
|
|
|
FifoProcessing.Start();
|
|
}
|
|
|
|
private void ProcessFifo()
|
|
{
|
|
while (KeepRunning)
|
|
{
|
|
Fifo.DispatchCalls();
|
|
|
|
Thread.Yield();
|
|
}
|
|
}
|
|
}
|
|
} |