Improve shader sending method to GAL, use a memory interface instead of reading a fixed array size and sending every time

This commit is contained in:
gdkchan 2018-05-22 22:43:31 -03:00
parent 84996ccd36
commit 79e0070363
12 changed files with 72 additions and 63 deletions

View file

@ -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);
}

View file

@ -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;