VideoCommon: Abstract bounding box

This moves much of the duplicated bounding box code into VideoCommon,
leaving only the specific buffer implementations in each backend.
This commit is contained in:
Techjar
2021-06-09 07:42:21 -04:00
parent 7ec02ee4d3
commit 1161af8059
41 changed files with 617 additions and 708 deletions

View File

@ -8,9 +8,10 @@
#include "VideoBackends/D3D12/DescriptorHeapManager.h"
#include "VideoCommon/RenderBase.h"
class BoundingBox;
namespace DX12
{
class BoundingBox;
class DXFramebuffer;
class DXTexture;
class DXShader;
@ -48,10 +49,6 @@ public:
const void* cache_data = nullptr,
size_t cache_data_length = 0) override;
u16 BBoxReadImpl(int index) override;
void BBoxWriteImpl(int index, u16 value) override;
void BBoxFlushImpl() override;
void Flush() override;
void WaitForGPUIdle() override;
@ -100,6 +97,8 @@ public:
protected:
void OnConfigChanged(u32 bits) override;
std::unique_ptr<BoundingBox> CreateBoundingBox() const override;
private:
static const u32 MAX_TEXTURES = 8;
static const u32 NUM_CONSTANT_BUFFERS = 3;
@ -150,7 +149,6 @@ private:
// Owned objects
std::unique_ptr<SwapChain> m_swap_chain;
std::unique_ptr<BoundingBox> m_bounding_box;
// Current state
struct