VertexLoaderARM64.h 1.1 KB

123456789101112131415161718192021222324252627282930
  1. // Copyright 2015 Dolphin Emulator Project
  2. // Licensed under GPLv2+
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "Common/Arm64Emitter.h"
  6. #include "VideoCommon/VertexLoaderBase.h"
  7. class VertexLoaderARM64 : public VertexLoaderBase, public Arm64Gen::ARM64CodeBlock
  8. {
  9. public:
  10. VertexLoaderARM64(const TVtxDesc& vtx_desc, const VAT& vtx_att);
  11. protected:
  12. std::string GetName() const override { return "VertexLoaderARM64"; }
  13. bool IsInitialized() override { return true; }
  14. int RunVertices(DataReader src, DataReader dst, int count) override;
  15. private:
  16. u32 m_src_ofs = 0;
  17. u32 m_dst_ofs = 0;
  18. Arm64Gen::FixupBranch m_skip_vertex;
  19. Arm64Gen::ARM64FloatEmitter m_float_emit;
  20. void GetVertexAddr(int array, u64 attribute, Arm64Gen::ARM64Reg reg);
  21. s32 GetAddressImm(int array, u64 attribute, Arm64Gen::ARM64Reg reg, u32 align);
  22. int ReadVertex(u64 attribute, int format, int count_in, int count_out, bool dequantize, u8 scaling_exponent, AttributeFormat* native_format, s32 offset = -1);
  23. void ReadColor(u64 attribute, int format, s32 offset);
  24. void GenerateVertexLoader();
  25. };