Merge pull request #10672 from Pokechu22/xf-invtxspec

Show panic alerts if the CP configuration doesn't match the XF configuration
This commit is contained in:
Pokechu22
2022-05-19 13:13:53 -07:00
committed by GitHub
13 changed files with 170 additions and 81 deletions

View File

@ -677,10 +677,9 @@ public:
}
process_component(vtx_desc.low.Position, vtx_attr.g0.PosFormat,
vtx_attr.g0.PosElements == CoordComponentCount::XY ? 2 : 3);
// TODO: Is this calculation correct?
const u32 normal_component_count =
vtx_desc.low.Normal == VertexComponentFormat::Direct ? 3 : 1;
const u32 normal_elements = vtx_attr.g0.NormalElements == NormalComponentCount::NBT ? 3 : 1;
const u32 normal_elements = vtx_attr.g0.NormalElements == NormalComponentCount::NTB ? 3 : 1;
process_component(vtx_desc.low.Normal, vtx_attr.g0.NormalFormat,
normal_component_count * normal_elements,
vtx_attr.g0.NormalIndex3 ? normal_elements : 1);