2014-12-04 19:01:20 -07:00
|
|
|
// Copyright 2014 Dolphin Emulator Project
|
2021-07-04 19:22:19 -06:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2014-12-04 19:01:20 -07:00
|
|
|
|
|
|
|
#pragma once
|
2021-06-09 05:42:21 -06:00
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
2014-12-04 19:01:20 -07:00
|
|
|
#include "VideoBackends/D3D/D3DBase.h"
|
|
|
|
|
2021-06-09 05:42:21 -06:00
|
|
|
#include "VideoCommon/BoundingBox.h"
|
|
|
|
|
2014-12-04 19:01:20 -07:00
|
|
|
namespace DX11
|
|
|
|
{
|
2021-06-09 05:42:21 -06:00
|
|
|
class D3DBoundingBox final : public BoundingBox
|
2014-12-04 19:01:20 -07:00
|
|
|
{
|
|
|
|
public:
|
2021-06-09 05:42:21 -06:00
|
|
|
~D3DBoundingBox() override;
|
2014-12-04 19:01:20 -07:00
|
|
|
|
2021-06-09 05:42:21 -06:00
|
|
|
bool Initialize() override;
|
2021-04-17 11:14:43 -06:00
|
|
|
|
2021-06-09 05:42:21 -06:00
|
|
|
protected:
|
|
|
|
std::vector<BBoxType> Read(u32 index, u32 length) override;
|
2023-12-09 12:54:17 -07:00
|
|
|
void Write(u32 index, std::span<const BBoxType> values) override;
|
2021-06-09 05:42:21 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
ComPtr<ID3D11Buffer> m_buffer;
|
|
|
|
ComPtr<ID3D11Buffer> m_staging_buffer;
|
|
|
|
ComPtr<ID3D11UnorderedAccessView> m_uav;
|
2014-12-04 19:01:20 -07:00
|
|
|
};
|
2021-06-09 05:42:21 -06:00
|
|
|
|
|
|
|
} // namespace DX11
|