aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/Texture.cs
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2021-05-16 19:43:27 +0100
committerGitHub <noreply@github.com>2021-05-16 20:43:27 +0200
commit212e472c9fac8253456d710e0b071579da330c0a (patch)
tree7dd5038a561cee9ca862ef8e0e952784ad7f2869 /Ryujinx.Graphics.Gpu/Image/Texture.cs
parentbec67dbef7a505fb5c4a1734be1517f67474fb4d (diff)
Use copy dependencies for the Intel/AMD view format workaround (#2144)
* This might help AMD a bit * Removal of old workaround.
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/Texture.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/Texture.cs9
1 files changed, 9 insertions, 0 deletions
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;
}