VertexLoaderX64.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2015 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include "Common/CommonTypes.h"
  5. #include "Common/x64Emitter.h"
  6. #include "VideoCommon/VertexLoaderBase.h"
  7. enum class VertexComponentFormat;
  8. enum class ComponentFormat;
  9. enum class ColorFormat;
  10. enum class CPArray : u8;
  11. class VertexLoaderX64 : public VertexLoaderBase, public Gen::X64CodeBlock
  12. {
  13. public:
  14. VertexLoaderX64(const TVtxDesc& vtx_desc, const VAT& vtx_att);
  15. protected:
  16. int RunVertices(const u8* src, u8* dst, int count) override;
  17. private:
  18. u32 m_src_ofs = 0;
  19. u32 m_dst_ofs = 0;
  20. Gen::FixupBranch m_skip_vertex;
  21. Gen::OpArg GetVertexAddr(CPArray array, VertexComponentFormat attribute);
  22. void ReadVertex(Gen::OpArg data, VertexComponentFormat attribute, ComponentFormat format,
  23. int count_in, int count_out, bool dequantize, u8 scaling_exponent,
  24. AttributeFormat* native_format);
  25. void ReadColor(Gen::OpArg data, VertexComponentFormat attribute, ColorFormat format);
  26. void GenerateVertexLoader();
  27. };