Ryujinx/Ryujinx.Graphics.GAL/BlendDescriptor.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

36 lines
1.1 KiB
C#

namespace Ryujinx.Graphics.GAL
{
public readonly struct BlendDescriptor
{
public bool Enable { get; }
public ColorF BlendConstant { get; }
public BlendOp ColorOp { get; }
public BlendFactor ColorSrcFactor { get; }
public BlendFactor ColorDstFactor { get; }
public BlendOp AlphaOp { get; }
public BlendFactor AlphaSrcFactor { get; }
public BlendFactor AlphaDstFactor { get; }
public BlendDescriptor(
bool enable,
ColorF blendConstant,
BlendOp colorOp,
BlendFactor colorSrcFactor,
BlendFactor colorDstFactor,
BlendOp alphaOp,
BlendFactor alphaSrcFactor,
BlendFactor alphaDstFactor)
{
Enable = enable;
BlendConstant = blendConstant;
ColorOp = colorOp;
ColorSrcFactor = colorSrcFactor;
ColorDstFactor = colorDstFactor;
AlphaOp = alphaOp;
AlphaSrcFactor = alphaSrcFactor;
AlphaDstFactor = alphaDstFactor;
}
}
}