diff options
| author | Berkan Diler <b.diler@gmx.de> | 2022-02-18 02:35:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-18 02:35:23 +0100 |
| commit | 98c838b24c464fd627ad09078250e4801db8967e (patch) | |
| tree | ff1fcd0371d55255bcd39876cc2d685a7fe7485b /Ryujinx.Graphics.Texture/BlockLinearLayout.cs | |
| parent | 63c9c64196465bd97abacceb1d83fa53de358d23 (diff) | |
Use BitOperations methods and delete now unused BitUtils methods (#3134)
Replaces BitUtils.CountTrailingZeros/CountLeadingZeros/IsPowerOfTwo with BitOperations methods
Diffstat (limited to 'Ryujinx.Graphics.Texture/BlockLinearLayout.cs')
| -rw-r--r-- | Ryujinx.Graphics.Texture/BlockLinearLayout.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.Texture/BlockLinearLayout.cs b/Ryujinx.Graphics.Texture/BlockLinearLayout.cs index 02b69987..e098e959 100644 --- a/Ryujinx.Graphics.Texture/BlockLinearLayout.cs +++ b/Ryujinx.Graphics.Texture/BlockLinearLayout.cs @@ -1,4 +1,5 @@ using Ryujinx.Common; +using System.Numerics; using System.Runtime.CompilerServices; using static Ryujinx.Graphics.Texture.BlockLinearConstants; @@ -47,15 +48,15 @@ namespace Ryujinx.Graphics.Texture { _texBpp = bpp; - _bppShift = BitUtils.CountTrailingZeros32(bpp); + _bppShift = BitOperations.TrailingZeroCount(bpp); _bhMask = gobBlocksInY - 1; _bdMask = gobBlocksInZ - 1; - _bhShift = BitUtils.CountTrailingZeros32(gobBlocksInY); - _bdShift = BitUtils.CountTrailingZeros32(gobBlocksInZ); + _bhShift = BitOperations.TrailingZeroCount(gobBlocksInY); + _bdShift = BitOperations.TrailingZeroCount(gobBlocksInZ); - _xShift = BitUtils.CountTrailingZeros32(GobSize * gobBlocksInY * gobBlocksInZ); + _xShift = BitOperations.TrailingZeroCount(GobSize * gobBlocksInY * gobBlocksInZ); RobAndSliceSizes rsSizes = GetRobAndSliceSizes(width, height, gobBlocksInY, gobBlocksInZ); |
