diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2021-08-11 17:27:00 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-11 22:27:00 +0200 |
| commit | ed754af8d5046d2fd7218c742521e38ab17cbcfe (patch) | |
| tree | d47eda40349a7b4b3fc34d9db9ddeea8f2d0676a /Ryujinx.Graphics.Gpu/Shader/ShaderDumper.cs | |
| parent | 10d649e6d3ad3e4af32d2b41e718bb0a2924da67 (diff) | |
Make sure attributes used on subsequent shader stages are initialized (#2538)
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> |
