Address feedback
This commit is contained in:
parent
15bf5eb919
commit
85711e6660
3 changed files with 8 additions and 6 deletions
|
@ -204,8 +204,10 @@ namespace ChocolArm64.Memory
|
||||||
return Modified;
|
return Modified;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IntPtr GetHostAddress(long Position)
|
public IntPtr GetHostAddress(long Position, long Size)
|
||||||
{
|
{
|
||||||
|
EnsureRangeIsValid(Position, Size, AMemoryPerm.Read);
|
||||||
|
|
||||||
return (IntPtr)(RamPtr + (ulong)Position);
|
return (IntPtr)(RamPtr + (ulong)Position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -548,7 +548,7 @@ namespace Ryujinx.HLE.Gpu.Engines
|
||||||
|
|
||||||
if (Cb.Enabled)
|
if (Cb.Enabled)
|
||||||
{
|
{
|
||||||
IntPtr DataAddress = Vmm.GetHostAddress(Cb.Position);
|
IntPtr DataAddress = Vmm.GetHostAddress(Cb.Position, Cb.Size);
|
||||||
|
|
||||||
Gpu.Renderer.Shader.SetConstBuffer(BasePosition + (uint)Offset, Cbuf, Cb.Size, DataAddress);
|
Gpu.Renderer.Shader.SetConstBuffer(BasePosition + (uint)Offset, Cbuf, Cb.Size, DataAddress);
|
||||||
}
|
}
|
||||||
|
@ -583,7 +583,7 @@ namespace Ryujinx.HLE.Gpu.Engines
|
||||||
|
|
||||||
if (!IboCached || Vmm.IsRegionModified(IboKey, (uint)IbSize, NvGpuBufferType.Index))
|
if (!IboCached || Vmm.IsRegionModified(IboKey, (uint)IbSize, NvGpuBufferType.Index))
|
||||||
{
|
{
|
||||||
IntPtr DataAddress = Vmm.GetHostAddress(IndexPosition);
|
IntPtr DataAddress = Vmm.GetHostAddress(IndexPosition, IbSize);
|
||||||
|
|
||||||
Gpu.Renderer.Rasterizer.CreateIbo(IboKey, IbSize, DataAddress);
|
Gpu.Renderer.Rasterizer.CreateIbo(IboKey, IbSize, DataAddress);
|
||||||
}
|
}
|
||||||
|
@ -647,7 +647,7 @@ namespace Ryujinx.HLE.Gpu.Engines
|
||||||
|
|
||||||
if (!VboCached || Vmm.IsRegionModified(VboKey, VbSize, NvGpuBufferType.Vertex))
|
if (!VboCached || Vmm.IsRegionModified(VboKey, VbSize, NvGpuBufferType.Vertex))
|
||||||
{
|
{
|
||||||
IntPtr DataAddress = Vmm.GetHostAddress(VertexPosition);
|
IntPtr DataAddress = Vmm.GetHostAddress(VertexPosition, VbSize);
|
||||||
|
|
||||||
Gpu.Renderer.Rasterizer.CreateVbo(VboKey, (int)VbSize, DataAddress);
|
Gpu.Renderer.Rasterizer.CreateVbo(VboKey, (int)VbSize, DataAddress);
|
||||||
}
|
}
|
||||||
|
|
|
@ -280,9 +280,9 @@ namespace Ryujinx.HLE.Gpu.Memory
|
||||||
return Cache.IsRegionModified(Memory, BufferType, PA, Size);
|
return Cache.IsRegionModified(Memory, BufferType, PA, Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IntPtr GetHostAddress(long Position)
|
public IntPtr GetHostAddress(long Position, long Size)
|
||||||
{
|
{
|
||||||
return Memory.GetHostAddress(GetPhysicalAddress(Position));
|
return Memory.GetHostAddress(GetPhysicalAddress(Position), Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte ReadByte(long Position)
|
public byte ReadByte(long Position)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue