aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Engine/ShaderCache.cs
diff options
context:
space:
mode:
authorgdk <gab.dark.100@gmail.com>2019-11-10 11:03:38 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commitd274328c3192fd85b9eec661b00f1599d673776c (patch)
tree0d947cbb00c42d85af4af4bc41422d896f493004 /Ryujinx.Graphics.Gpu/Engine/ShaderCache.cs
parentd620aa7d1b39177b0c549c3e7a1a5736a980912f (diff)
Fix image units bindings and shader dump in the presence of NOPs
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/ShaderCache.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Engine/ShaderCache.cs28
1 files changed, 24 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/ShaderCache.cs b/Ryujinx.Graphics.Gpu/Engine/ShaderCache.cs
index d280ea6f..922f4a44 100644
--- a/Ryujinx.Graphics.Gpu/Engine/ShaderCache.cs
+++ b/Ryujinx.Graphics.Gpu/Engine/ShaderCache.cs
@@ -117,7 +117,13 @@ namespace Ryujinx.Graphics.Gpu.Engine
program = Translator.Translate(code, translationConfig);
- _dumper.Dump(gpuVa, compute : true);
+ _dumper.Dump(code, compute : true, out string fullPath, out string codePath);
+
+ if (fullPath != null && codePath != null)
+ {
+ program.Prepend("// " + codePath);
+ program.Prepend("// " + fullPath);
+ }
return program;
}
@@ -144,8 +150,16 @@ namespace Ryujinx.Graphics.Gpu.Engine
program = Translator.Translate(codeA, codeB, translationConfig);
- _dumper.Dump(gpuVaA, compute: false);
- _dumper.Dump(gpuVa, compute: false);
+ _dumper.Dump(codeA, compute: false, out string fullPathA, out string codePathA);
+ _dumper.Dump(codeB, compute: false, out string fullPathB, out string codePathB);
+
+ if (fullPathA != null && fullPathB != null && codePathA != null && codePathB != null)
+ {
+ program.Prepend("// " + codePathB);
+ program.Prepend("// " + fullPathB);
+ program.Prepend("// " + codePathA);
+ program.Prepend("// " + fullPathA);
+ }
}
else
{
@@ -153,7 +167,13 @@ namespace Ryujinx.Graphics.Gpu.Engine
program = Translator.Translate(code, translationConfig);
- _dumper.Dump(gpuVa, compute: false);
+ _dumper.Dump(code, compute: false, out string fullPath, out string codePath);
+
+ if (fullPath != null && codePath != null)
+ {
+ program.Prepend("// " + codePath);
+ program.Prepend("// " + fullPath);
+ }
}
if (program.Stage == ShaderStage.Geometry)