diff --git a/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs b/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs index 07afb253e9..af7ac038ff 100644 --- a/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs +++ b/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs @@ -28,10 +28,16 @@ namespace Ryujinx.Graphics.Gpu.Engine // When the source texture that was found has a depth format, // we must enforce the target texture also has a depth format, // as copies between depth and color formats are not allowed. - if (srcTexture.Format == Format.D32Float) + dstCopyTexture.Format = srcTexture.Format switch { - dstCopyTexture.Format = RtFormat.D32Float; - } + Format.S8Uint => RtFormat.S8Uint, + Format.D16Unorm => RtFormat.D16Unorm, + Format.D24X8Unorm => RtFormat.D24Unorm, + Format.D32Float => RtFormat.D32Float, + Format.D24UnormS8Uint => RtFormat.D24UnormS8Uint, + Format.D32FloatS8Uint => RtFormat.D32FloatS8Uint, + _ => dstCopyTexture.Format + }; Texture dstTexture = TextureManager.FindOrCreateTexture(dstCopyTexture, srcTexture.ScaleMode == Image.TextureScaleMode.Scaled);