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 | |
| parent | bf87f02c0c9aa24605cf825d94a0d675c737b87c (diff) | |
Fix buffer to 3D texture copy (#1354)
Diffstat (limited to 'Ryujinx.Graphics.Texture')
| -rw-r--r-- | Ryujinx.Graphics.Texture/BlockLinearLayout.cs | 1 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Texture/LayoutConverter.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Texture/OffsetCalculator.cs | 14 |
3 files changed, 12 insertions, 5 deletions
diff --git a/Ryujinx.Graphics.Texture/BlockLinearLayout.cs b/Ryujinx.Graphics.Texture/BlockLinearLayout.cs index 0b112242..02b69987 100644 --- a/Ryujinx.Graphics.Texture/BlockLinearLayout.cs +++ b/Ryujinx.Graphics.Texture/BlockLinearLayout.cs @@ -41,7 +41,6 @@ namespace Ryujinx.Graphics.Texture public BlockLinearLayout( int width, int height, - int depth, int gobBlocksInY, int gobBlocksInZ, int bpp) diff --git a/Ryujinx.Graphics.Texture/LayoutConverter.cs b/Ryujinx.Graphics.Texture/LayoutConverter.cs index 525271c4..2ad57d59 100644 --- a/Ryujinx.Graphics.Texture/LayoutConverter.cs +++ b/Ryujinx.Graphics.Texture/LayoutConverter.cs @@ -84,7 +84,6 @@ namespace Ryujinx.Graphics.Texture BlockLinearLayout layoutConverter = new BlockLinearLayout( wAligned, h, - d, mipGobBlocksInY, mipGobBlocksInZ, bytesPerPixel); @@ -256,7 +255,6 @@ namespace Ryujinx.Graphics.Texture BlockLinearLayout layoutConverter = new BlockLinearLayout( wAligned, h, - d, mipGobBlocksInY, mipGobBlocksInZ, bytesPerPixel); 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) |
