aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-07-23 11:53:14 -0300
committerGitHub <noreply@github.com>2022-07-23 11:53:14 -0300
commit7f8a3541eb4d4d64390c8dd5d3849ea4606c59fb (patch)
treef113e7cdba1439dab516bded1b2923d34b6cc185
parentb34de74f81ef73a78d43d169b9f1ce7f175035b5 (diff)
Fix decoding of block after shader BRA.CC instructions without predicate (#3472)1.1.184
* Fix decoding of block after BRA.CC instructions without predicate * Shader cache version bump
-rw-r--r--Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs2
-rw-r--r--Ryujinx.Graphics.Shader/Decoders/Block.cs6
-rw-r--r--Ryujinx.Graphics.Shader/Decoders/Decoder.cs3
-rw-r--r--Ryujinx.Graphics.Shader/Translation/Rewriter.cs2
4 files changed, 9 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs b/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs
index b76d8226..33a87fa5 100644
--- a/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs
+++ b/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs
@@ -21,7 +21,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
private const ushort FileFormatVersionMajor = 1;
private const ushort FileFormatVersionMinor = 1;
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
- private const uint CodeGenVersion = 3478;
+ private const uint CodeGenVersion = 3472;
private const string SharedTocFileName = "shared.toc";
private const string SharedDataFileName = "shared.data";
diff --git a/Ryujinx.Graphics.Shader/Decoders/Block.cs b/Ryujinx.Graphics.Shader/Decoders/Block.cs
index 0b55c59e..ddd81cc5 100644
--- a/Ryujinx.Graphics.Shader/Decoders/Block.cs
+++ b/Ryujinx.Graphics.Shader/Decoders/Block.cs
@@ -92,7 +92,11 @@ namespace Ryujinx.Graphics.Shader.Decoders
pushOpInfo.Consumers.Add(rightBlock, local);
}
- rightBlock.SyncTargets.Union(SyncTargets);
+ foreach ((ulong key, SyncTarget value) in SyncTargets)
+ {
+ rightBlock.SyncTargets.Add(key, value);
+ }
+
SyncTargets.Clear();
// Move push ops.
diff --git a/Ryujinx.Graphics.Shader/Decoders/Decoder.cs b/Ryujinx.Graphics.Shader/Decoders/Decoder.cs
index 60ad540c..69f9a520 100644
--- a/Ryujinx.Graphics.Shader/Decoders/Decoder.cs
+++ b/Ryujinx.Graphics.Shader/Decoders/Decoder.cs
@@ -340,7 +340,7 @@ namespace Ryujinx.Graphics.Shader.Decoders
{
InstConditional condOp = new InstConditional(op.RawOpCode);
- if (op.Name == InstName.Exit && condOp.Ccc != Ccc.T)
+ if ((op.Name == InstName.Bra || op.Name == InstName.Exit) && condOp.Ccc != Ccc.T)
{
return false;
}
@@ -672,6 +672,7 @@ namespace Ryujinx.Graphics.Shader.Decoders
// Make sure we found the correct address,
// the push and pop instruction types must match, so:
// - BRK can only consume addresses pushed by PBK.
+ // - CONT can only consume addresses pushed by PCNT.
// - SYNC can only consume addresses pushed by SSY.
if (found)
{
diff --git a/Ryujinx.Graphics.Shader/Translation/Rewriter.cs b/Ryujinx.Graphics.Shader/Translation/Rewriter.cs
index d59da019..4d66597f 100644
--- a/Ryujinx.Graphics.Shader/Translation/Rewriter.cs
+++ b/Ryujinx.Graphics.Shader/Translation/Rewriter.cs
@@ -164,7 +164,7 @@ namespace Ryujinx.Graphics.Shader.Translation
bool isBindless = (texOp.Flags & TextureFlags.Bindless) != 0;
- bool isCoordNormalized = !isBindless && config.GpuAccessor.QueryTextureCoordNormalized(texOp.Handle, texOp.CbufSlot);
+ bool isCoordNormalized = isBindless || config.GpuAccessor.QueryTextureCoordNormalized(texOp.Handle, texOp.CbufSlot);
if (!hasInvalidOffset && isCoordNormalized)
{