Do not perform layout conversion on buffer texture flushes (#1729)

This commit is contained in:
gdkchan 2020-11-18 18:17:40 -03:00 committed by GitHub
parent 0679084f11
commit 7f536b5a15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -809,33 +809,36 @@ namespace Ryujinx.Graphics.Gpu.Image
} }
} }
if (Info.IsLinear) if (Info.Target != Target.TextureBuffer)
{ {
data = LayoutConverter.ConvertLinearToLinearStrided( if (Info.IsLinear)
Info.Width, {
Info.Height, data = LayoutConverter.ConvertLinearToLinearStrided(
Info.FormatInfo.BlockWidth, Info.Width,
Info.FormatInfo.BlockHeight, Info.Height,
Info.Stride, Info.FormatInfo.BlockWidth,
Info.FormatInfo.BytesPerPixel, Info.FormatInfo.BlockHeight,
data); Info.Stride,
} Info.FormatInfo.BytesPerPixel,
else data);
{ }
data = LayoutConverter.ConvertLinearToBlockLinear( else
Info.Width, {
Info.Height, data = LayoutConverter.ConvertLinearToBlockLinear(
_depth, Info.Width,
Info.Levels, Info.Height,
_layers, _depth,
Info.FormatInfo.BlockWidth, Info.Levels,
Info.FormatInfo.BlockHeight, _layers,
Info.FormatInfo.BytesPerPixel, Info.FormatInfo.BlockWidth,
Info.GobBlocksInY, Info.FormatInfo.BlockHeight,
Info.GobBlocksInZ, Info.FormatInfo.BytesPerPixel,
Info.GobBlocksInTileX, Info.GobBlocksInY,
_sizeInfo, Info.GobBlocksInZ,
data); Info.GobBlocksInTileX,
_sizeInfo,
data);
}
} }
return data; return data;