aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-05-03 21:20:12 -0300
committerGitHub <noreply@github.com>2023-05-03 21:20:12 -0300
commit4d1579acbf60ff23f14b591db762267f93092d0c (patch)
tree494acfffeaf6901b19c1967129582c4e3efe7a4c /src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs
parent6279f5e4305b1dd5844c0a0e3538fcdd72e6bf33 (diff)
Fix some invalid blits involving depth textures (#4723)1.1.748
Diffstat (limited to 'src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs')
-rw-r--r--src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs8
1 files changed, 8 insertions, 0 deletions
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
/// <param name="copyTexture">Copy texture to find or create</param>
/// <param name="offset">Offset to be added to the physical texture address</param>
/// <param name="formatInfo">Format information of the copy texture</param>
+ /// <param name="depthAlias">Indicates if aliasing between color and depth format should be allowed</param>
+ /// <param name="shouldCreate">Indicates if a new texture should be created if none is found on the cache</param>
/// <param name="preferScaling">Indicates if the texture should be scaled from the start</param>
/// <param name="sizeHint">A hint indicating the minimum used size for the texture</param>
/// <returns>The texture</returns>
@@ -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;