VertexLoaderARM64: Specify the register to use as a parameter to ReadVertex

This also means that both a register and a vertex are always specified, though right now if the register is scratch1_reg the offset is always 0.
This commit is contained in:
Pokechu22
2022-07-15 13:22:58 -07:00
parent ad644d5e92
commit f148de161f
2 changed files with 35 additions and 57 deletions

View File

@ -3,6 +3,8 @@
#pragma once
#include <utility>
#include "Common/Arm64Emitter.h"
#include "Common/CommonTypes.h"
#include "VideoCommon/VertexLoaderBase.h"
@ -26,10 +28,11 @@ private:
u32 m_dst_ofs = 0;
Arm64Gen::FixupBranch m_skip_vertex;
Arm64Gen::ARM64FloatEmitter m_float_emit;
s32 GetVertexAddr(CPArray array, VertexComponentFormat attribute, Arm64Gen::ARM64Reg reg);
std::pair<Arm64Gen::ARM64Reg, u32> GetVertexAddr(CPArray array, VertexComponentFormat attribute);
int ReadVertex(VertexComponentFormat attribute, ComponentFormat format, int count_in,
int count_out, bool dequantize, u8 scaling_exponent,
AttributeFormat* native_format, s32 offset = -1);
void ReadColor(VertexComponentFormat attribute, ColorFormat format, s32 offset);
AttributeFormat* native_format, Arm64Gen::ARM64Reg reg, u32 offset);
void ReadColor(VertexComponentFormat attribute, ColorFormat format, Arm64Gen::ARM64Reg reg,
u32 offset);
void GenerateVertexLoader();
};