ryujinx-mirror/Ryujinx.Graphics.Texture/Utils/BC7ModeInfo.cs
Andrey Sukharev 4da44e09cb
Make structs readonly when applicable (#4002)
* Make all structs readonly when applicable. It should reduce amount of needless defensive copies

* Make structs with trivial boilerplate equality code record structs

* Remove unnecessary readonly modifiers from TextureCreateInfo

* Make BitMap structs readonly too
2022-12-05 14:47:39 +01:00

37 lines
No EOL
1.2 KiB
C#

namespace Ryujinx.Graphics.Texture.Utils
{
readonly struct BC7ModeInfo
{
public readonly int SubsetCount;
public readonly int PartitionBitCount;
public readonly int PBits;
public readonly int RotationBitCount;
public readonly int IndexModeBitCount;
public readonly int ColorIndexBitCount;
public readonly int AlphaIndexBitCount;
public readonly int ColorDepth;
public readonly int AlphaDepth;
public BC7ModeInfo(
int subsetCount,
int partitionBitsCount,
int pBits,
int rotationBitCount,
int indexModeBitCount,
int colorIndexBitCount,
int alphaIndexBitCount,
int colorDepth,
int alphaDepth)
{
SubsetCount = subsetCount;
PartitionBitCount = partitionBitsCount;
PBits = pBits;
RotationBitCount = rotationBitCount;
IndexModeBitCount = indexModeBitCount;
ColorIndexBitCount = colorIndexBitCount;
AlphaIndexBitCount = alphaIndexBitCount;
ColorDepth = colorDepth;
AlphaDepth = alphaDepth;
}
}
}