VertexLoaderX64.h 922 B

123456789101112131415161718192021222324252627
  1. // Copyright 2015 Dolphin Emulator Project
  2. // Licensed under GPLv2+
  3. // Refer to the license.txt file included.
  4. #include "Common/x64Emitter.h"
  5. #include "VideoCommon/VertexLoaderBase.h"
  6. class VertexLoaderX64 : public VertexLoaderBase, public Gen::X64CodeBlock
  7. {
  8. public:
  9. VertexLoaderX64(const TVtxDesc& vtx_desc, const VAT& vtx_att);
  10. protected:
  11. std::string GetName() const override { return "VertexLoaderX64"; }
  12. bool IsInitialized() override { return true; }
  13. int RunVertices(DataReader src, DataReader dst, int count) override;
  14. private:
  15. u32 m_src_ofs = 0;
  16. u32 m_dst_ofs = 0;
  17. Gen::FixupBranch m_skip_vertex;
  18. Gen::OpArg GetVertexAddr(int array, u64 attribute);
  19. int ReadVertex(Gen::OpArg data, u64 attribute, int format, int count_in, int count_out, bool dequantize, u8 scaling_exponent, AttributeFormat* native_format);
  20. void ReadColor(Gen::OpArg data, u64 attribute, int format);
  21. void GenerateVertexLoader();
  22. };