diff options
| author | riperiperi <rhy3756547@hotmail.com> | 2021-03-19 01:17:38 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-19 02:17:38 +0100 |
| commit | 9b7335a63bd921d38866090e8c53f35b8e050939 (patch) | |
| tree | bfb6aa5d5e1cef0b1cf02f5683bb5cbdd923c1ca /Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs | |
| parent | 39899c04076a8e9004b173320ffbb6dbf45ff3e4 (diff) | |
Improve linear texture compatibility rules (#2099)
* Improve linear texture compatibility rules
Fixes an issue where small or width-aligned (rather than byte aligned) textures would fail to create a view of existing data. Creates a copy dependency as size change may be risky.
* Minor cleanup
* Remove Size Change for Copy Depenedencies
The copy to the target (potentially different sized) texture can properly deal with cropping by itself.
* Move StrideAlignment and GobAlignment into Constants
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs b/Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs index 15ebb236..dd16cb2d 100644 --- a/Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs +++ b/Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs @@ -8,9 +8,6 @@ namespace Ryujinx.Graphics.Gpu.Engine { partial class Methods { - private const int StrideAlignment = 32; - private const int GobAlignment = 64; - enum CopyFlags { SrcLinear = 1 << 7, @@ -32,14 +29,14 @@ namespace Ryujinx.Graphics.Gpu.Engine { if (linear) { - int alignWidth = StrideAlignment / bpp; + int alignWidth = Constants.StrideAlignment / bpp; return tex.RegionX == 0 && tex.RegionY == 0 && stride / bpp == BitUtils.AlignUp(cbp.XCount, alignWidth); } else { - int alignWidth = GobAlignment / bpp; + int alignWidth = Constants.GobAlignment / bpp; return tex.RegionX == 0 && tex.RegionY == 0 && tex.Width == BitUtils.AlignUp(cbp.XCount, alignWidth) && |
