D3DBoundingBox.h 643 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2014 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include "Common/CommonTypes.h"
  5. #include "VideoBackends/D3D/D3DBase.h"
  6. #include "VideoCommon/BoundingBox.h"
  7. namespace DX11
  8. {
  9. class D3DBoundingBox final : public BoundingBox
  10. {
  11. public:
  12. ~D3DBoundingBox() override;
  13. bool Initialize() override;
  14. protected:
  15. std::vector<BBoxType> Read(u32 index, u32 length) override;
  16. void Write(u32 index, std::span<const BBoxType> values) override;
  17. private:
  18. ComPtr<ID3D11Buffer> m_buffer;
  19. ComPtr<ID3D11Buffer> m_staging_buffer;
  20. ComPtr<ID3D11UnorderedAccessView> m_uav;
  21. };
  22. } // namespace DX11