Move GPU LLE emulation from HLE to Graphics
This commit is contained in:
parent
b549daed03
commit
9ab3690839
33 changed files with 61 additions and 60 deletions
|
@ -1,6 +1,6 @@
|
||||||
using Ryujinx.HLE.Gpu.Memory;
|
using Ryujinx.Graphics.Memory;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Engines
|
namespace Ryujinx.Graphics.Engines
|
||||||
{
|
{
|
||||||
interface INvGpuEngine
|
interface INvGpuEngine
|
||||||
{
|
{
|
|
@ -1,8 +1,8 @@
|
||||||
using Ryujinx.HLE.Gpu.Memory;
|
using Ryujinx.Graphics.Memory;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Engines
|
namespace Ryujinx.Graphics.Engines
|
||||||
{
|
{
|
||||||
class MacroInterpreter
|
class MacroInterpreter
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ryujinx.HLE.Gpu.Engines
|
namespace Ryujinx.Graphics.Engines
|
||||||
{
|
{
|
||||||
enum NvGpuEngine
|
enum NvGpuEngine
|
||||||
{
|
{
|
|
@ -1,12 +1,12 @@
|
||||||
using Ryujinx.Graphics.Gal;
|
using Ryujinx.Graphics.Gal;
|
||||||
using Ryujinx.HLE.Gpu.Memory;
|
using Ryujinx.Graphics.Memory;
|
||||||
using Ryujinx.HLE.Gpu.Texture;
|
using Ryujinx.Graphics.Texture;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Engines
|
namespace Ryujinx.Graphics.Engines
|
||||||
{
|
{
|
||||||
class NvGpuEngine2d : INvGpuEngine
|
public class NvGpuEngine2d : INvGpuEngine
|
||||||
{
|
{
|
||||||
private enum CopyOperation
|
private enum CopyOperation
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ryujinx.HLE.Gpu.Engines
|
namespace Ryujinx.Graphics.Engines
|
||||||
{
|
{
|
||||||
enum NvGpuEngine2dReg
|
enum NvGpuEngine2dReg
|
||||||
{
|
{
|
|
@ -1,12 +1,12 @@
|
||||||
using Ryujinx.Graphics.Gal;
|
using Ryujinx.Graphics.Gal;
|
||||||
using Ryujinx.HLE.Gpu.Memory;
|
using Ryujinx.Graphics.Memory;
|
||||||
using Ryujinx.HLE.Gpu.Texture;
|
using Ryujinx.Graphics.Texture;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Engines
|
namespace Ryujinx.Graphics.Engines
|
||||||
{
|
{
|
||||||
class NvGpuEngine3d : INvGpuEngine
|
public class NvGpuEngine3d : INvGpuEngine
|
||||||
{
|
{
|
||||||
public int[] Registers { get; private set; }
|
public int[] Registers { get; private set; }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ryujinx.HLE.Gpu.Engines
|
namespace Ryujinx.Graphics.Engines
|
||||||
{
|
{
|
||||||
enum NvGpuEngine3dReg
|
enum NvGpuEngine3dReg
|
||||||
{
|
{
|
|
@ -1,10 +1,10 @@
|
||||||
using Ryujinx.HLE.Gpu.Memory;
|
using Ryujinx.Graphics.Memory;
|
||||||
using Ryujinx.HLE.Gpu.Texture;
|
using Ryujinx.Graphics.Texture;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Engines
|
namespace Ryujinx.Graphics.Engines
|
||||||
{
|
{
|
||||||
class NvGpuEngineDma : INvGpuEngine
|
public class NvGpuEngineDma : INvGpuEngine
|
||||||
{
|
{
|
||||||
public int[] Registers { get; private set; }
|
public int[] Registers { get; private set; }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ryujinx.HLE.Gpu.Engines
|
namespace Ryujinx.Graphics.Engines
|
||||||
{
|
{
|
||||||
enum NvGpuEngineDmaReg
|
enum NvGpuEngineDmaReg
|
||||||
{
|
{
|
|
@ -1,10 +1,10 @@
|
||||||
using Ryujinx.HLE.Gpu.Memory;
|
using Ryujinx.Graphics.Memory;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Engines
|
namespace Ryujinx.Graphics.Engines
|
||||||
{
|
{
|
||||||
class NvGpuFifo
|
public class NvGpuFifo
|
||||||
{
|
{
|
||||||
private const int MacrosCount = 0x80;
|
private const int MacrosCount = 0x80;
|
||||||
private const int MacroIndexMask = MacrosCount - 1;
|
private const int MacroIndexMask = MacrosCount - 1;
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ryujinx.HLE.Gpu.Engines
|
namespace Ryujinx.Graphics.Engines
|
||||||
{
|
{
|
||||||
enum NvGpuFifoMeth
|
enum NvGpuFifoMeth
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using Ryujinx.HLE.Gpu.Memory;
|
using Ryujinx.Graphics.Memory;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Engines
|
namespace Ryujinx.Graphics.Engines
|
||||||
{
|
{
|
||||||
delegate void NvGpuMethod(NvGpuVmm Vmm, NvGpuPBEntry PBEntry);
|
delegate void NvGpuMethod(NvGpuVmm Vmm, NvGpuPBEntry PBEntry);
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
namespace Ryujinx.HLE.Gpu.Memory
|
namespace Ryujinx.Graphics.Memory
|
||||||
{
|
{
|
||||||
enum NvGpuBufferType
|
public enum NvGpuBufferType
|
||||||
{
|
{
|
||||||
Index,
|
Index,
|
||||||
Vertex,
|
Vertex,
|
|
@ -1,9 +1,9 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Memory
|
namespace Ryujinx.Graphics.Memory
|
||||||
{
|
{
|
||||||
struct NvGpuPBEntry
|
public struct NvGpuPBEntry
|
||||||
{
|
{
|
||||||
public int Method { get; private set; }
|
public int Method { get; private set; }
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Memory
|
namespace Ryujinx.Graphics.Memory
|
||||||
{
|
{
|
||||||
static class NvGpuPushBuffer
|
public static class NvGpuPushBuffer
|
||||||
{
|
{
|
||||||
private enum SubmissionMode
|
private enum SubmissionMode
|
||||||
{
|
{
|
|
@ -2,9 +2,9 @@ using ChocolArm64.Memory;
|
||||||
using Ryujinx.Graphics.Gal;
|
using Ryujinx.Graphics.Gal;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Memory
|
namespace Ryujinx.Graphics.Memory
|
||||||
{
|
{
|
||||||
class NvGpuVmm : IAMemory, IGalMemory
|
public class NvGpuVmm : IAMemory, IGalMemory
|
||||||
{
|
{
|
||||||
public const long AddrSize = 1L << 40;
|
public const long AddrSize = 1L << 40;
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
using ChocolArm64.Memory;
|
using ChocolArm64.Memory;
|
||||||
using Ryujinx.HLE.Memory;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Memory
|
namespace Ryujinx.Graphics.Memory
|
||||||
{
|
{
|
||||||
class NvGpuVmmCache
|
class NvGpuVmmCache
|
||||||
{
|
{
|
||||||
|
private const long RamSize = 4L * 1024 * 1024 * 1024;
|
||||||
|
|
||||||
private const int MaxCpCount = 10000;
|
private const int MaxCpCount = 10000;
|
||||||
private const int MaxCpTimeDelta = 60000;
|
private const int MaxCpTimeDelta = 60000;
|
||||||
|
|
||||||
|
@ -226,7 +227,7 @@ namespace Ryujinx.HLE.Gpu.Memory
|
||||||
{
|
{
|
||||||
if (Residency == null)
|
if (Residency == null)
|
||||||
{
|
{
|
||||||
Residency = new HashSet<long>[DeviceMemory.RamSize / PageSize];
|
Residency = new HashSet<long>[RamSize / PageSize];
|
||||||
|
|
||||||
for (int i = 0; i < Residency.Length; i++)
|
for (int i = 0; i < Residency.Length; i++)
|
||||||
{
|
{
|
|
@ -1,9 +1,9 @@
|
||||||
using Ryujinx.Graphics.Gal;
|
using Ryujinx.Graphics.Gal;
|
||||||
using Ryujinx.HLE.Gpu.Engines;
|
using Ryujinx.Graphics.Engines;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu
|
namespace Ryujinx.Graphics
|
||||||
{
|
{
|
||||||
class NvGpu
|
public class NvGpu
|
||||||
{
|
{
|
||||||
public IGalRenderer Renderer { get; private set; }
|
public IGalRenderer Renderer { get; private set; }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Texture
|
namespace Ryujinx.Graphics.Texture
|
||||||
{
|
{
|
||||||
class BlockLinearSwizzle : ISwizzle
|
class BlockLinearSwizzle : ISwizzle
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ryujinx.HLE.Gpu.Texture
|
namespace Ryujinx.Graphics.Texture
|
||||||
{
|
{
|
||||||
interface ISwizzle
|
interface ISwizzle
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ryujinx.HLE.Gpu.Texture
|
namespace Ryujinx.Graphics.Texture
|
||||||
{
|
{
|
||||||
class LinearSwizzle : ISwizzle
|
class LinearSwizzle : ISwizzle
|
||||||
{
|
{
|
|
@ -1,8 +1,8 @@
|
||||||
using Ryujinx.Graphics.Gal;
|
using Ryujinx.Graphics.Gal;
|
||||||
using Ryujinx.HLE.Gpu.Memory;
|
using Ryujinx.Graphics.Memory;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Texture
|
namespace Ryujinx.Graphics.Texture
|
||||||
{
|
{
|
||||||
static class TextureFactory
|
static class TextureFactory
|
||||||
{
|
{
|
|
@ -1,9 +1,9 @@
|
||||||
using ChocolArm64.Memory;
|
using ChocolArm64.Memory;
|
||||||
using Ryujinx.Graphics.Gal;
|
using Ryujinx.Graphics.Gal;
|
||||||
using Ryujinx.HLE.Gpu.Memory;
|
using Ryujinx.Graphics.Memory;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Texture
|
namespace Ryujinx.Graphics.Texture
|
||||||
{
|
{
|
||||||
static class TextureHelper
|
static class TextureHelper
|
||||||
{
|
{
|
|
@ -1,8 +1,8 @@
|
||||||
using Ryujinx.Graphics.Gal;
|
using Ryujinx.Graphics.Gal;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Texture
|
namespace Ryujinx.Graphics.Texture
|
||||||
{
|
{
|
||||||
struct TextureInfo
|
public struct TextureInfo
|
||||||
{
|
{
|
||||||
public long Position { get; private set; }
|
public long Position { get; private set; }
|
||||||
|
|
|
@ -2,9 +2,9 @@ using ChocolArm64.Memory;
|
||||||
using Ryujinx.Graphics.Gal;
|
using Ryujinx.Graphics.Gal;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Texture
|
namespace Ryujinx.Graphics.Texture
|
||||||
{
|
{
|
||||||
static class TextureReader
|
public static class TextureReader
|
||||||
{
|
{
|
||||||
public static byte[] Read(IAMemory Memory, TextureInfo Texture)
|
public static byte[] Read(IAMemory Memory, TextureInfo Texture)
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
namespace Ryujinx.HLE.Gpu.Texture
|
namespace Ryujinx.Graphics.Texture
|
||||||
{
|
{
|
||||||
enum TextureSwizzle
|
public enum TextureSwizzle
|
||||||
{
|
{
|
||||||
_1dBuffer = 0,
|
_1dBuffer = 0,
|
||||||
PitchColorKey = 1,
|
PitchColorKey = 1,
|
|
@ -1,6 +1,6 @@
|
||||||
using ChocolArm64.Memory;
|
using ChocolArm64.Memory;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.Gpu.Texture
|
namespace Ryujinx.Graphics.Texture
|
||||||
{
|
{
|
||||||
static class TextureWriter
|
static class TextureWriter
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
using Ryujinx.HLE.Gpu.Memory;
|
using Ryujinx.Graphics.Memory;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
using ChocolArm64.Memory;
|
using ChocolArm64.Memory;
|
||||||
using Ryujinx.HLE.Gpu.Memory;
|
using Ryujinx.Graphics.Memory;
|
||||||
using Ryujinx.HLE.HOS.Services.Nv.NvMap;
|
using Ryujinx.HLE.HOS.Services.Nv.NvMap;
|
||||||
using Ryujinx.HLE.Logging;
|
using Ryujinx.HLE.Logging;
|
||||||
using System;
|
using System;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
using ChocolArm64.Memory;
|
using ChocolArm64.Memory;
|
||||||
using Ryujinx.HLE.Gpu.Memory;
|
using Ryujinx.Graphics.Memory;
|
||||||
using Ryujinx.HLE.HOS.Services.Nv.NvGpuAS;
|
using Ryujinx.HLE.HOS.Services.Nv.NvGpuAS;
|
||||||
using Ryujinx.HLE.Logging;
|
using Ryujinx.HLE.Logging;
|
||||||
using System;
|
using System;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
using ChocolArm64.Memory;
|
using ChocolArm64.Memory;
|
||||||
using Ryujinx.HLE.Gpu.Memory;
|
using Ryujinx.Graphics.Memory;
|
||||||
using Ryujinx.HLE.Logging;
|
using Ryujinx.HLE.Logging;
|
||||||
using Ryujinx.HLE.Utilities;
|
using Ryujinx.HLE.Utilities;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
using Ryujinx.Graphics.Gal;
|
using Ryujinx.Graphics.Gal;
|
||||||
using Ryujinx.HLE.Gpu.Texture;
|
using Ryujinx.Graphics.Texture;
|
||||||
using Ryujinx.HLE.HOS.Kernel;
|
using Ryujinx.HLE.HOS.Kernel;
|
||||||
using Ryujinx.HLE.HOS.Services.Nv.NvMap;
|
using Ryujinx.HLE.HOS.Services.Nv.NvMap;
|
||||||
using Ryujinx.HLE.Logging;
|
using Ryujinx.HLE.Logging;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using Ryujinx.Audio;
|
using Ryujinx.Audio;
|
||||||
using Ryujinx.Graphics.Gal;
|
using Ryujinx.Graphics.Gal;
|
||||||
using Ryujinx.HLE.Gpu;
|
using Ryujinx.Graphics;
|
||||||
using Ryujinx.HLE.HOS;
|
using Ryujinx.HLE.HOS;
|
||||||
using Ryujinx.HLE.Input;
|
using Ryujinx.HLE.Input;
|
||||||
using Ryujinx.HLE.Logging;
|
using Ryujinx.HLE.Logging;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue