Convert BPMemory to BitField and enum class

Additional changes:
- For TevStageCombiner's ColorCombiner and AlphaCombiner, op/comparison and scale/compare_mode have been split as there are different meanings and enums if bias is set to compare.  (Shift has also been renamed to scale)
- In TexMode0, min_filter has been split into min_mip and min_filter.
- In TexImage1, image_type is now cache_manually_managed.
- The unused bit in GenMode is now exposed.
- LPSize's lineaspect is now named adjust_for_aspect_ratio.
This commit is contained in:
Pokechu22
2021-02-10 18:11:31 -08:00
parent db8ced7e4e
commit 70f9fc4e75
33 changed files with 1553 additions and 1236 deletions

View File

@ -28,7 +28,7 @@ union RasterizationState
bool operator==(const RasterizationState& rhs) const { return hex == rhs.hex; }
bool operator!=(const RasterizationState& rhs) const { return hex != rhs.hex; }
bool operator<(const RasterizationState& rhs) const { return hex < rhs.hex; }
BitField<0, 2, GenMode::CullMode> cullmode;
BitField<0, 2, CullMode> cullmode;
BitField<3, 2, PrimitiveType> primitive;
u32 hex;
@ -59,7 +59,7 @@ union DepthState
bool operator<(const DepthState& rhs) const { return hex < rhs.hex; }
BitField<0, 1, u32> testenable;
BitField<1, 1, u32> updateenable;
BitField<2, 3, ZMode::CompareMode> func;
BitField<2, 3, CompareMode> func;
u32 hex;
};
@ -85,11 +85,11 @@ union BlendingState
BitField<5, 1, u32> subtract;
BitField<6, 1, u32> subtractAlpha;
BitField<7, 1, u32> usedualsrc;
BitField<8, 3, BlendMode::BlendFactor> dstfactor;
BitField<11, 3, BlendMode::BlendFactor> srcfactor;
BitField<14, 3, BlendMode::BlendFactor> dstfactoralpha;
BitField<17, 3, BlendMode::BlendFactor> srcfactoralpha;
BitField<20, 4, BlendMode::LogicOp> logicmode;
BitField<8, 3, DstBlendFactor> dstfactor;
BitField<11, 3, SrcBlendFactor> srcfactor;
BitField<14, 3, DstBlendFactor> dstfactoralpha;
BitField<17, 3, SrcBlendFactor> srcfactoralpha;
BitField<20, 4, LogicOp> logicmode;
u32 hex;
};