RenderState: Use operator== for operator!= and adjust constructors

This commit is contained in:
Pokechu22
2021-10-06 17:36:15 -07:00
parent 6236a0d494
commit a273b65566
2 changed files with 77 additions and 42 deletions

View File

@ -18,18 +18,6 @@ void RasterizationState::Generate(const BPMemory& bp, PrimitiveType primitive_ty
cullmode = CullMode::None;
}
RasterizationState& RasterizationState::operator=(const RasterizationState& rhs)
{
hex = rhs.hex;
return *this;
}
FramebufferState& FramebufferState::operator=(const FramebufferState& rhs)
{
hex = rhs.hex;
return *this;
}
void DepthState::Generate(const BPMemory& bp)
{
testenable = bp.zmode.testenable.Value();
@ -37,12 +25,6 @@ void DepthState::Generate(const BPMemory& bp)
func = bp.zmode.func.Value();
}
DepthState& DepthState::operator=(const DepthState& rhs)
{
hex = rhs.hex;
return *this;
}
// If the framebuffer format has no alpha channel, it is assumed to
// ONE on blending. As the backends may emulate this framebuffer
// configuration with an alpha channel, we just drop all references
@ -217,12 +199,6 @@ void BlendingState::ApproximateLogicOpWithBlending()
dstfactor = approximations[u32(logicmode.Value())].dstfactor;
}
BlendingState& BlendingState::operator=(const BlendingState& rhs)
{
hex = rhs.hex;
return *this;
}
void SamplerState::Generate(const BPMemory& bp, u32 index)
{
auto tex = bp.tex.GetUnit(index);
@ -249,12 +225,6 @@ void SamplerState::Generate(const BPMemory& bp, u32 index)
anisotropic_filtering = 0;
}
SamplerState& SamplerState::operator=(const SamplerState& rhs)
{
hex = rhs.hex;
return *this;
}
namespace RenderState
{
RasterizationState GetInvalidRasterizationState()