Calculate width from stride on texture copies

This commit is contained in:
gdk
2020-01-09 02:13:00 +01:00
committed by Thog
parent 1876b346fe
commit 1bb08742c1
2 changed files with 14 additions and 6 deletions
+12 -1
View File
@@ -245,9 +245,20 @@ namespace Ryujinx.Graphics.Gpu.Image
FormatInfo formatInfo = copyTexture.Format.Convert();
int width;
if (copyTexture.LinearLayout)
{
width = copyTexture.Stride / formatInfo.BytesPerPixel;
}
else
{
width = copyTexture.Width;
}
TextureInfo info = new TextureInfo(
address,
copyTexture.Width,
width,
copyTexture.Height,
copyTexture.Depth,
1,