diff options
author | gdkchan <gab.dark.100@gmail.com> | 2020-11-18 18:17:40 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 22:17:40 +0100 |
commit | 7f536b5a15d55008073cd73a4c4a17cd3a4991d7 (patch) | |
tree | 66d31898fa75d1c7b91a5c8523af8f8033be03d4 /Ryujinx.Graphics.Gpu/Image/Texture.cs | |
parent | 0679084f115b6838dec4d8c5e85044c33d4122d0 (diff) |
Do not perform layout conversion on buffer texture flushes (#1729)
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/Texture.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Image/Texture.cs | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/Texture.cs b/Ryujinx.Graphics.Gpu/Image/Texture.cs index 5b3a01c5..21418a4b 100644 --- a/Ryujinx.Graphics.Gpu/Image/Texture.cs +++ b/Ryujinx.Graphics.Gpu/Image/Texture.cs @@ -809,33 +809,36 @@ namespace Ryujinx.Graphics.Gpu.Image } } - if (Info.IsLinear) + if (Info.Target != Target.TextureBuffer) { - data = LayoutConverter.ConvertLinearToLinearStrided( - Info.Width, - Info.Height, - Info.FormatInfo.BlockWidth, - Info.FormatInfo.BlockHeight, - Info.Stride, - Info.FormatInfo.BytesPerPixel, - data); - } - else - { - data = LayoutConverter.ConvertLinearToBlockLinear( - Info.Width, - Info.Height, - _depth, - Info.Levels, - _layers, - Info.FormatInfo.BlockWidth, - Info.FormatInfo.BlockHeight, - Info.FormatInfo.BytesPerPixel, - Info.GobBlocksInY, - Info.GobBlocksInZ, - Info.GobBlocksInTileX, - _sizeInfo, - data); + if (Info.IsLinear) + { + data = LayoutConverter.ConvertLinearToLinearStrided( + Info.Width, + Info.Height, + Info.FormatInfo.BlockWidth, + Info.FormatInfo.BlockHeight, + Info.Stride, + Info.FormatInfo.BytesPerPixel, + data); + } + else + { + data = LayoutConverter.ConvertLinearToBlockLinear( + Info.Width, + Info.Height, + _depth, + Info.Levels, + _layers, + Info.FormatInfo.BlockWidth, + Info.FormatInfo.BlockHeight, + Info.FormatInfo.BytesPerPixel, + Info.GobBlocksInY, + Info.GobBlocksInZ, + Info.GobBlocksInTileX, + _sizeInfo, + data); + } } return data; |