Rename Ryujinx.Core to Ryujinx.HLE and add a separate project for a future LLE implementation
This commit is contained in:
parent
518fe799da
commit
76f3b1b3a4
248 changed files with 2266 additions and 2244 deletions
26
Ryujinx.ShaderTools/Memory.cs
Normal file
26
Ryujinx.ShaderTools/Memory.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
using Ryujinx.Graphics.Gal;
|
||||
using System.IO;
|
||||
|
||||
namespace Ryujinx.ShaderTools
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
42
Ryujinx.ShaderTools/Program.cs
Normal file
42
Ryujinx.ShaderTools/Program.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using Ryujinx.Graphics.Gal;
|
||||
using Ryujinx.Graphics.Gal.Shader;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Ryujinx.ShaderTools
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
if (args.Length == 2)
|
||||
{
|
||||
GlslDecompiler Decompiler = new GlslDecompiler();
|
||||
|
||||
GalShaderType ShaderType = GalShaderType.Vertex;
|
||||
|
||||
switch (args[0].ToLower())
|
||||
{
|
||||
case "v": ShaderType = GalShaderType.Vertex; break;
|
||||
case "tc": ShaderType = GalShaderType.TessControl; break;
|
||||
case "te": ShaderType = GalShaderType.TessEvaluation; break;
|
||||
case "g": ShaderType = GalShaderType.Geometry; break;
|
||||
case "f": ShaderType = GalShaderType.Fragment; break;
|
||||
}
|
||||
|
||||
using (FileStream FS = new FileStream(args[1], FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
Memory Mem = new Memory(FS);
|
||||
|
||||
GlslProgram Program = Decompiler.Decompile(Mem, 0, ShaderType);
|
||||
|
||||
Console.WriteLine(Program.Code);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Usage: Ryujinx.ShaderTools [v|tc|te|g|f] shader.bin");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
12
Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj
Normal file
12
Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj
Normal file
|
@ -0,0 +1,12 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Ryujinx.Graphics\Ryujinx.Graphics.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
Loading…
Add table
Add a link
Reference in a new issue