Add missing depth-color conversions in CopyTexture (#1474)
* Add missing depth-color conversions in CopyTexture * Whitespace * switch expression
This commit is contained in:
parent
0de5367369
commit
2a314f3c28
1 changed files with 9 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue