Some cleanup

This commit is contained in:
gdkchan 2018-08-13 01:51:47 -03:00
parent 393f3e16e2
commit 008f652c36
4 changed files with 7 additions and 25 deletions

View file

@ -471,11 +471,11 @@ namespace Ryujinx.HLE.Gpu.Engines
{
ConstBuffer Cb = ConstBuffers[Stage][Index];
long Key = Cb.Position;
long Key = Vmm.GetPhysicalAddress(Cb.Position);
if (Cb.Enabled && QueryKeyUpload(Vmm, Key, Cb.Size, NvGpuBufferType.ConstBuffer))
{
IntPtr Source = Vmm.GetHostAddress(Key, Cb.Size);
IntPtr Source = Vmm.GetHostAddress(Cb.Position, Cb.Size);
Gpu.Renderer.Buffer.SetData(Key, Cb.Size, Source);
}
@ -669,11 +669,13 @@ namespace Ryujinx.HLE.Gpu.Engines
long Position = MakeInt64From2xInt32(NvGpuEngine3dReg.ConstBufferAddress);
long CbKey = Vmm.GetPhysicalAddress(Position);
int Size = ReadRegister(NvGpuEngine3dReg.ConstBufferSize);
if (!Gpu.Renderer.Buffer.IsCached(Position, Size))
if (!Gpu.Renderer.Buffer.IsCached(CbKey, Size))
{
Gpu.Renderer.Buffer.Create(Position, Size);
Gpu.Renderer.Buffer.Create(CbKey, Size);
}
ConstBuffer Cb = ConstBuffers[Stage][Index];

View file

@ -28,8 +28,6 @@ namespace Ryujinx.HLE.OsHle.Font
private Dictionary<SharedFontType, FontInfo> FontData;
private bool[] LoadedFonts;
public SharedFontManager(Switch Device, long PhysicalAddress)
{
this.PhysicalAddress = PhysicalAddress;
@ -37,8 +35,6 @@ namespace Ryujinx.HLE.OsHle.Font
Memory = Device.Memory;
FontsPath = Path.Combine(Device.VFs.GetSystemPath(), "fonts");
LoadedFonts = new bool[(int)SharedFontType.Count];
}
public void EnsureInitialized()

View file

@ -103,21 +103,7 @@ namespace Ryujinx.HLE.OsHle
}
}
void LoadNpdm(string FileName)
{
string File = Directory.GetFiles(ExeFsDir, FileName)[0];
Ns.Log.PrintInfo(LogClass.Loader, "Loading Title Metadata...");
using (FileStream Input = new FileStream(File, FileMode.Open))
{
MainProcess.Metadata = new Npdm(Input);
}
}
LoadNpdm("*.npdm");
if (!MainProcess.Metadata.Is64Bits)
if (!MainProcess.MetaData.Is64Bits)
{
throw new NotImplementedException("32-bit titles are unsupported!");
}

View file

@ -52,8 +52,6 @@ namespace Ryujinx.HLE.OsHle
public AppletStateMgr AppletState { get; private set; }
public Npdm Metadata { get; set; }
private SvcHandler SvcHandler;
private ConcurrentDictionary<long, KThread> Threads;