diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Shader/ShaderDumper.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Shader/ShaderDumper.cs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/Ryujinx.Graphics.Gpu/Shader/ShaderDumper.cs b/Ryujinx.Graphics.Gpu/Shader/ShaderDumper.cs index c170f9e2..8247bbfb 100644 --- a/Ryujinx.Graphics.Gpu/Shader/ShaderDumper.cs +++ b/Ryujinx.Graphics.Gpu/Shader/ShaderDumper.cs @@ -1,4 +1,4 @@ -using System; +using Ryujinx.Graphics.Shader; using System.IO; namespace Ryujinx.Graphics.Gpu.Shader @@ -30,24 +30,20 @@ namespace Ryujinx.Graphics.Gpu.Shader /// </summary> /// <param name="code">Code to be dumped</param> /// <param name="compute">True for compute shader code, false for graphics shader code</param> - /// <param name="fullPath">Output path for the shader code with header included</param> - /// <param name="codePath">Output path for the shader code without header</param> - public void Dump(byte[] code, bool compute, out string fullPath, out string codePath) + /// <returns>Paths where the shader code was dumped</returns> + public ShaderDumpPaths Dump(byte[] code, bool compute) { _dumpPath = GraphicsConfig.ShadersDumpPath; if (string.IsNullOrWhiteSpace(_dumpPath)) { - fullPath = null; - codePath = null; - - return; + return default; } string fileName = "Shader" + CurrentDumpIndex.ToString("d4") + ".bin"; - fullPath = Path.Combine(FullDir(), fileName); - codePath = Path.Combine(CodeDir(), fileName); + string fullPath = Path.Combine(FullDir(), fileName); + string codePath = Path.Combine(CodeDir(), fileName); CurrentDumpIndex++; @@ -73,6 +69,8 @@ namespace Ryujinx.Graphics.Gpu.Shader { codeWriter.Write(0); } + + return new ShaderDumpPaths(fullPath, codePath); } /// <summary> |
