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