aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Core
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-05-22 22:43:31 -0300
committergdkchan <gab.dark.100@gmail.com>2018-05-22 22:43:31 -0300
commit79e007036383b11cd53c2563fbb7f139a02c90ec (patch)
treec7ddfc097282b98afd16f08cc5042636f9283224 /Ryujinx.Core
parent84996ccd36a5fa13892c1f02acb1c79031c35aa5 (diff)
Improve shader sending method to GAL, use a memory interface instead of reading a fixed array size and sending every time
Diffstat (limited to 'Ryujinx.Core')
-rw-r--r--Ryujinx.Core/Gpu/NvGpuEngine3d.cs7
-rw-r--r--Ryujinx.Core/Gpu/NvGpuVmm.cs4
2 files changed, 4 insertions, 7 deletions
diff --git a/Ryujinx.Core/Gpu/NvGpuEngine3d.cs b/Ryujinx.Core/Gpu/NvGpuEngine3d.cs
index b08b9496..5639dd02 100644
--- a/Ryujinx.Core/Gpu/NvGpuEngine3d.cs
+++ b/Ryujinx.Core/Gpu/NvGpuEngine3d.cs
@@ -138,16 +138,11 @@ namespace Ryujinx.Core.Gpu
long Tag = BasePosition + (uint)Offset;
- //TODO: Find a better way to calculate the size.
- int Size = 0x20000;
-
- byte[] Code = Vmm.ReadBytes(Tag, Size);
-
GalShaderType ShaderType = GetTypeFromProgram(Index);
Tags[(int)ShaderType] = Tag;
- Gpu.Renderer.CreateShader(Tag, ShaderType, Code);
+ Gpu.Renderer.CreateShader(Vmm, Tag, ShaderType);
Gpu.Renderer.BindShader(Tag);
}
diff --git a/Ryujinx.Core/Gpu/NvGpuVmm.cs b/Ryujinx.Core/Gpu/NvGpuVmm.cs
index cf94a6c0..ddd21238 100644
--- a/Ryujinx.Core/Gpu/NvGpuVmm.cs
+++ b/Ryujinx.Core/Gpu/NvGpuVmm.cs
@@ -1,9 +1,11 @@
using ChocolArm64.Memory;
using System.Collections.Concurrent;
+using Ryujinx.Graphics.Gal;
+
namespace Ryujinx.Core.Gpu
{
- public class NvGpuVmm : IAMemory
+ public class NvGpuVmm : IAMemory, IGalMemory
{
public const long AddrSize = 1L << 40;