MTLVertexManager.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2022 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include "VideoBackends/Metal/MTLUtil.h"
  5. #include "VideoCommon/VertexManagerBase.h"
  6. namespace Metal
  7. {
  8. class VertexManager final : public VertexManagerBase
  9. {
  10. public:
  11. VertexManager();
  12. ~VertexManager() override;
  13. void UploadUtilityUniforms(const void* uniforms, u32 uniforms_size) override;
  14. bool UploadTexelBuffer(const void* data, u32 data_size, TexelBufferFormat format,
  15. u32* out_offset) override;
  16. bool UploadTexelBuffer(const void* data, u32 data_size, TexelBufferFormat format, u32* out_offset,
  17. const void* palette_data, u32 palette_size,
  18. TexelBufferFormat palette_format, u32* out_palette_offset) override;
  19. protected:
  20. void ResetBuffer(u32 vertex_stride) override;
  21. void CommitBuffer(u32 num_vertices, u32 vertex_stride, u32 num_indices, u32* out_base_vertex,
  22. u32* out_base_index) override;
  23. void UploadUniforms() override;
  24. private:
  25. u32 m_vertex_offset;
  26. u32 m_base_vertex;
  27. };
  28. } // namespace Metal