From 79e007036383b11cd53c2563fbb7f139a02c90ec Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 22 May 2018 22:43:31 -0300 Subject: Improve shader sending method to GAL, use a memory interface instead of reading a fixed array size and sending every time --- Ryujinx.Core/Gpu/NvGpuEngine3d.cs | 7 +------ Ryujinx.Core/Gpu/NvGpuVmm.cs | 4 +++- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'Ryujinx.Core/Gpu') 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; -- cgit v1.2.3