diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-07-03 20:37:36 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-04 01:37:36 +0200 |
| commit | 76e5af967a39879187214f0973d226eba126e93f (patch) | |
| tree | 8f8ef960700fd10a4cca58468f183a1ff4f3c800 /Ryujinx.Graphics.Texture/OffsetCalculator.cs | |
| parent | bf87f02c0c9aa24605cf825d94a0d675c737b87c (diff) | |
Fix buffer to 3D texture copy (#1354)
Diffstat (limited to 'Ryujinx.Graphics.Texture/OffsetCalculator.cs')
| -rw-r--r-- | Ryujinx.Graphics.Texture/OffsetCalculator.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Texture/OffsetCalculator.cs b/Ryujinx.Graphics.Texture/OffsetCalculator.cs index 1f5d9614..6d283954 100644 --- a/Ryujinx.Graphics.Texture/OffsetCalculator.cs +++ b/Ryujinx.Graphics.Texture/OffsetCalculator.cs @@ -23,6 +23,7 @@ namespace Ryujinx.Graphics.Texture int stride, bool isLinear, int gobBlocksInY, + int gobBlocksInZ, int bytesPerPixel) { _width = width; @@ -40,13 +41,22 @@ namespace Ryujinx.Graphics.Texture _layoutConverter = new BlockLinearLayout( wAligned, height, - 1, gobBlocksInY, - 1, + gobBlocksInZ, bytesPerPixel); } } + public OffsetCalculator( + int width, + int height, + int stride, + bool isLinear, + int gobBlocksInY, + int bytesPerPixel) : this(width, height, stride, isLinear, gobBlocksInY, 1, bytesPerPixel) + { + } + public void SetY(int y) { if (_isLinear) |
