aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/TextureCache.cs
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2022-01-11 08:37:40 +0000
committerGitHub <noreply@github.com>2022-01-11 09:37:40 +0100
commitef24c8983dc3971cd906568d337e49be694ee542 (patch)
treef3e2a13f1c29d4f2996d5d99746cfbdf2786dd5b /Ryujinx.Graphics.Gpu/Image/TextureCache.cs
parent275275f7ac1c365e84e36df4e4382d0ac64292af (diff)
Fix adjacent 3d texture slices being detected as Incompatible Overlaps (#2993)
This fixes some regressions caused by #2971 which caused rendered 3D texture data to be lost for most slices. Fixes issues with Xenoblade 2's colour grading, probably a ton of other games. This also removes the check from TextureCache, making it the tiniest bit smaller (any win is a win here).
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TextureCache.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/TextureCache.cs10
1 files changed, 2 insertions, 8 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureCache.cs b/Ryujinx.Graphics.Gpu/Image/TextureCache.cs
index fab38e14..fed89770 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureCache.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureCache.cs
@@ -582,7 +582,7 @@ namespace Ryujinx.Graphics.Gpu.Image
if (oInfo.Compatibility <= TextureViewCompatibility.LayoutIncompatible)
{
- if (!overlap.IsView && texture.DataOverlaps(overlap))
+ if (!overlap.IsView && texture.DataOverlaps(overlap, oInfo.Compatibility))
{
texture.Group.RegisterIncompatibleOverlap(new TextureIncompatibleOverlap(overlap.Group, oInfo.Compatibility), true);
}
@@ -657,7 +657,7 @@ namespace Ryujinx.Graphics.Gpu.Image
}
else
{
- bool dataOverlaps = texture.DataOverlaps(overlap);
+ bool dataOverlaps = texture.DataOverlaps(overlap, compatibility);
if (!overlap.IsView && dataOverlaps && !incompatibleOverlaps.Exists(incompatible => incompatible.Group == overlap.Group))
{
@@ -676,12 +676,6 @@ namespace Ryujinx.Graphics.Gpu.Image
continue;
}
- if (info.GobBlocksInZ > 1 && info.GobBlocksInZ == overlap.Info.GobBlocksInZ)
- {
- // Allow overlapping slices of 3D textures. Could be improved in future by making sure the textures don't overlap.
- continue;
- }
-
// The overlap texture is going to contain garbage data after we draw, or is generally incompatible.
// The texture group will obtain copy dependencies for any subresources that are compatible between the two textures,
// but sometimes its data must be flushed regardless.