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:
parent
84996ccd36
commit
79e0070363
12 changed files with 72 additions and 63 deletions
26
Ryushader/Memory.cs
Normal file
26
Ryushader/Memory.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
using Ryujinx.Graphics.Gal;
|
||||
using System.IO;
|
||||
|
||||
namespace Ryushader
|
||||
{
|
||||
class Memory : IGalMemory
|
||||
{
|
||||
private Stream BaseStream;
|
||||
|
||||
private BinaryReader Reader;
|
||||
|
||||
public Memory(Stream BaseStream)
|
||||
{
|
||||
this.BaseStream = BaseStream;
|
||||
|
||||
Reader = new BinaryReader(BaseStream);
|
||||
}
|
||||
|
||||
public int ReadInt32(long Position)
|
||||
{
|
||||
BaseStream.Seek(Position, SeekOrigin.Begin);
|
||||
|
||||
return Reader.ReadInt32();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue