Fix decoding of block after shader BRA.CC instructions without predicate (#3472)

* Fix decoding of block after BRA.CC instructions without predicate

* Shader cache version bump
This commit is contained in:
gdkchan 2022-07-23 11:53:14 -03:00 committed by GitHub
parent b34de74f81
commit 7f8a3541eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View file

@ -21,7 +21,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
private const ushort FileFormatVersionMajor = 1; private const ushort FileFormatVersionMajor = 1;
private const ushort FileFormatVersionMinor = 1; private const ushort FileFormatVersionMinor = 1;
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor; 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 SharedTocFileName = "shared.toc";
private const string SharedDataFileName = "shared.data"; private const string SharedDataFileName = "shared.data";

View file

@ -92,7 +92,11 @@ namespace Ryujinx.Graphics.Shader.Decoders
pushOpInfo.Consumers.Add(rightBlock, local); pushOpInfo.Consumers.Add(rightBlock, local);
} }
rightBlock.SyncTargets.Union(SyncTargets); foreach ((ulong key, SyncTarget value) in SyncTargets)
{
rightBlock.SyncTargets.Add(key, value);
}
SyncTargets.Clear(); SyncTargets.Clear();
// Move push ops. // Move push ops.

View file

@ -340,7 +340,7 @@ namespace Ryujinx.Graphics.Shader.Decoders
{ {
InstConditional condOp = new InstConditional(op.RawOpCode); 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; return false;
} }
@ -672,6 +672,7 @@ namespace Ryujinx.Graphics.Shader.Decoders
// Make sure we found the correct address, // Make sure we found the correct address,
// the push and pop instruction types must match, so: // the push and pop instruction types must match, so:
// - BRK can only consume addresses pushed by PBK. // - BRK can only consume addresses pushed by PBK.
// - CONT can only consume addresses pushed by PCNT.
// - SYNC can only consume addresses pushed by SSY. // - SYNC can only consume addresses pushed by SSY.
if (found) if (found)
{ {

View file

@ -164,7 +164,7 @@ namespace Ryujinx.Graphics.Shader.Translation
bool isBindless = (texOp.Flags & TextureFlags.Bindless) != 0; 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) if (!hasInvalidOffset && isCoordNormalized)
{ {