Fix some invalid blits involving depth textures (#4723)

This commit is contained in:
gdkchan 2023-05-03 21:20:12 -03:00 committed by GitHub
parent 6279f5e430
commit 4d1579acbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 8 deletions

View file

@ -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;