From 4d1579acbf60ff23f14b591db762267f93092d0c Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 3 May 2023 21:20:12 -0300 Subject: Fix some invalid blits involving depth textures (#4723) --- src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs') diff --git a/src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs b/src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs index fc2c07e5..49191239 100644 --- a/src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs +++ b/src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs @@ -249,6 +249,8 @@ namespace Ryujinx.Graphics.Gpu.Image /// Copy texture to find or create /// Offset to be added to the physical texture address /// Format information of the copy texture + /// Indicates if aliasing between color and depth format should be allowed + /// Indicates if a new texture should be created if none is found on the cache /// Indicates if the texture should be scaled from the start /// A hint indicating the minimum used size for the texture /// The texture @@ -257,6 +259,7 @@ namespace Ryujinx.Graphics.Gpu.Image TwodTexture copyTexture, ulong offset, FormatInfo formatInfo, + bool depthAlias, bool shouldCreate, bool preferScaling, Size sizeHint) @@ -293,6 +296,11 @@ namespace Ryujinx.Graphics.Gpu.Image TextureSearchFlags flags = TextureSearchFlags.ForCopy; + if (depthAlias) + { + flags |= TextureSearchFlags.DepthAlias; + } + if (preferScaling) { flags |= TextureSearchFlags.WithUpscale; -- cgit v1.2.3