| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <utility> |
| 7 |
|
| 8 |
#include "Common/Arm64Emitter.h" |
| 9 |
#include "Common/CommonTypes.h" |
| 10 |
#include "VideoCommon/VertexLoaderBase.h" |
| 11 |
|
| 12 |
enum class VertexComponentFormat; |
| 13 |
enum class ComponentFormat; |
| 14 |
enum class ColorFormat; |
| 15 |
enum class CPArray : u8; |
| 16 |
|
| 17 |
class VertexLoaderARM64 : public VertexLoaderBase, public Arm64Gen::ARM64CodeBlock |
| 18 |
{ |
| 19 |
public: |
| 20 |
VertexLoaderARM64(const TVtxDesc& vtx_desc, const VAT& vtx_att); |
| 21 |
|
| 22 |
protected: |
| 23 |
int RunVertices(const u8* src, u8* dst, int count) override; |
| 24 |
|
| 25 |
private: |
| 26 |
u32 m_src_ofs = 0; |
| 27 |
u32 m_dst_ofs = 0; |
| 28 |
Arm64Gen::FixupBranch m_skip_vertex; |
| 29 |
Arm64Gen::ARM64FloatEmitter m_float_emit; |
| 30 |
std::pair<Arm64Gen::ARM64Reg, u32> GetVertexAddr(CPArray array, VertexComponentFormat attribute); |
| 31 |
void ReadVertex(VertexComponentFormat attribute, ComponentFormat format, int count_in, |
| 32 |
int count_out, bool dequantize, u8 scaling_exponent, |
| 33 |
AttributeFormat* native_format, Arm64Gen::ARM64Reg reg, u32 offset); |
| 34 |
void ReadColor(VertexComponentFormat attribute, ColorFormat format, Arm64Gen::ARM64Reg reg, |
| 35 |
u32 offset); |
| 36 |
void GenerateVertexLoader(); |
| 37 |
}; |