OpcodeDecoding: Get vertex size from the loader

This commit is contained in:
Robin Kertels
2022-09-17 14:19:13 +02:00
parent a6c6ec012c
commit 2db74e7f21
5 changed files with 29 additions and 2 deletions

View File

@ -55,6 +55,11 @@ public:
OPCODE_CALLBACK(CPState& GetCPState()) { return m_cpmem; }
OPCODE_CALLBACK(u32 GetVertexSize(u8 vat))
{
return VertexLoaderBase::GetVertexSize(GetCPState().vtx_desc, GetCPState().vtx_attr[vat]);
}
bool m_start_of_primitives = false;
bool m_end_of_primitives = false;
bool m_efb_copy = false;

View File

@ -45,6 +45,11 @@ public:
OPCODE_CALLBACK(CPState& GetCPState()) { return m_cpmem; }
OPCODE_CALLBACK(u32 GetVertexSize(u8 vat))
{
return VertexLoaderBase::GetVertexSize(GetCPState().vtx_desc, GetCPState().vtx_attr[vat]);
}
private:
void ProcessVertexComponent(CPArray array_index, VertexComponentFormat array_type,
u32 component_offset, u32 vertex_size, u16 num_vertices,