From 212e472c9fac8253456d710e0b071579da330c0a Mon Sep 17 00:00:00 2001 From: riperiperi Date: Sun, 16 May 2021 19:43:27 +0100 Subject: Use copy dependencies for the Intel/AMD view format workaround (#2144) * This might help AMD a bit * Removal of old workaround. --- Ryujinx.Graphics.Gpu/Image/Texture.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Ryujinx.Graphics.Gpu') diff --git a/Ryujinx.Graphics.Gpu/Image/Texture.cs b/Ryujinx.Graphics.Gpu/Image/Texture.cs index 6d2510f1..4d7e31c5 100644 --- a/Ryujinx.Graphics.Gpu/Image/Texture.cs +++ b/Ryujinx.Graphics.Gpu/Image/Texture.cs @@ -1014,6 +1014,15 @@ namespace Ryujinx.Graphics.Gpu.Image result = TextureCompatibility.PropagateViewCompatibility(result, TextureCompatibility.ViewTargetCompatible(Info, info)); result = TextureCompatibility.PropagateViewCompatibility(result, TextureCompatibility.ViewSubImagesInBounds(Info, info, firstLayer, firstLevel)); + if (result == TextureViewCompatibility.Full && Info.FormatInfo.Format != info.FormatInfo.Format && !_context.Capabilities.SupportsMismatchingViewFormat) + { + // AMD and Intel have a bug where the view format is always ignored; + // they use the parent format instead. + // Create a copy dependency to avoid this issue. + + result = TextureViewCompatibility.CopyOnly; + } + return (Info.SamplesInX == info.SamplesInX && Info.SamplesInY == info.SamplesInY) ? result : TextureViewCompatibility.Incompatible; } -- cgit v1.2.3