mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-12-23 20:36:49 +01:00
Fix depth compare value for TLD4S shader instruction with offset (#6253)
* Fix depth compare value for TLD4S shader instruction with offset * Shader cache version bump
This commit is contained in:
parent
24c8b0edc0
commit
bbed3b9926
2 changed files with 9 additions and 8 deletions
|
@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
||||||
private const ushort FileFormatVersionMajor = 1;
|
private const ushort FileFormatVersionMajor = 1;
|
||||||
private const ushort FileFormatVersionMinor = 2;
|
private const ushort FileFormatVersionMinor = 2;
|
||||||
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
|
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
|
||||||
private const uint CodeGenVersion = 5958;
|
private const uint CodeGenVersion = 6253;
|
||||||
|
|
||||||
private const string SharedTocFileName = "shared.toc";
|
private const string SharedTocFileName = "shared.toc";
|
||||||
private const string SharedDataFileName = "shared.data";
|
private const string SharedDataFileName = "shared.data";
|
||||||
|
|
|
@ -578,12 +578,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||||
type = SamplerType.Texture2D;
|
type = SamplerType.Texture2D;
|
||||||
flags = TextureFlags.Gather;
|
flags = TextureFlags.Gather;
|
||||||
|
|
||||||
if (tld4sOp.Dc)
|
int depthCompareIndex = sourcesList.Count;
|
||||||
{
|
|
||||||
sourcesList.Add(Rb());
|
|
||||||
|
|
||||||
type |= SamplerType.Shadow;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tld4sOp.Aoffi)
|
if (tld4sOp.Aoffi)
|
||||||
{
|
{
|
||||||
|
@ -592,7 +587,13 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||||
flags |= TextureFlags.Offset;
|
flags |= TextureFlags.Offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tld4sOp.Dc)
|
if (tld4sOp.Dc)
|
||||||
|
{
|
||||||
|
sourcesList.Insert(depthCompareIndex, Rb());
|
||||||
|
|
||||||
|
type |= SamplerType.Shadow;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
sourcesList.Add(Const((int)tld4sOp.TexComp));
|
sourcesList.Add(Const((int)tld4sOp.TexComp));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue