aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/Gpu/Engines
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-07-19 16:02:51 -0300
committergdkchan <gab.dark.100@gmail.com>2018-07-19 16:02:51 -0300
commit5fe0bc584b21c660e083a9cb37aa0a8be4719f95 (patch)
tree1d8a1e44d379d03a0d967a92475756d05a9e62e2 /Ryujinx.HLE/Gpu/Engines
parent45bb24dbae7b4fb4118036aa74024605995510fd (diff)
Send data to OpenGL host without client-side copies (#285)
* Directly send host address to buffer data * Cleanup OGLShader * Directly copy vertex and index data too * Revert shader bind "cache" * Address feedback
Diffstat (limited to 'Ryujinx.HLE/Gpu/Engines')
-rw-r--r--Ryujinx.HLE/Gpu/Engines/NvGpuEngine3d.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Ryujinx.HLE/Gpu/Engines/NvGpuEngine3d.cs b/Ryujinx.HLE/Gpu/Engines/NvGpuEngine3d.cs
index dce25a5e..c3e7a77f 100644
--- a/Ryujinx.HLE/Gpu/Engines/NvGpuEngine3d.cs
+++ b/Ryujinx.HLE/Gpu/Engines/NvGpuEngine3d.cs
@@ -560,9 +560,9 @@ namespace Ryujinx.HLE.Gpu.Engines
if (Cb.Enabled)
{
- byte[] Data = Vmm.ReadBytes(Cb.Position, (uint)Cb.Size);
+ IntPtr DataAddress = Vmm.GetHostAddress(Cb.Position, Cb.Size);
- Gpu.Renderer.Shader.SetConstBuffer(BasePosition + (uint)Offset, Cbuf, Data);
+ Gpu.Renderer.Shader.SetConstBuffer(BasePosition + (uint)Offset, Cbuf, Cb.Size, DataAddress);
}
}
}
@@ -595,9 +595,9 @@ namespace Ryujinx.HLE.Gpu.Engines
if (!IboCached || Vmm.IsRegionModified(IboKey, (uint)IbSize, NvGpuBufferType.Index))
{
- byte[] Data = Vmm.ReadBytes(IndexPosition, (uint)IbSize);
+ IntPtr DataAddress = Vmm.GetHostAddress(IndexPosition, IbSize);
- Gpu.Renderer.Rasterizer.CreateIbo(IboKey, Data);
+ Gpu.Renderer.Rasterizer.CreateIbo(IboKey, IbSize, DataAddress);
}
Gpu.Renderer.Rasterizer.SetIndexArray(IbSize, IndexFormat);
@@ -659,9 +659,9 @@ namespace Ryujinx.HLE.Gpu.Engines
if (!VboCached || Vmm.IsRegionModified(VboKey, VbSize, NvGpuBufferType.Vertex))
{
- byte[] Data = Vmm.ReadBytes(VertexPosition, VbSize);
+ IntPtr DataAddress = Vmm.GetHostAddress(VertexPosition, VbSize);
- Gpu.Renderer.Rasterizer.CreateVbo(VboKey, Data);
+ Gpu.Renderer.Rasterizer.CreateVbo(VboKey, (int)VbSize, DataAddress);
}
Gpu.Renderer.Rasterizer.SetVertexArray(Stride, VboKey, Attribs[Index].ToArray());