diff options
| author | Léo Lam <leo@leolam.fr> | 2021-10-08 22:24:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-08 22:24:38 +0200 |
| commit | ff1cb5a1c08d5a4a2a0449b8b23a4977ccc20f8a (patch) | |
| tree | a584d167e0c71c08d4d885f60aa071f5a577692e /Source/Core/VideoBackends/Vulkan/VKRenderer.cpp | |
| parent | d90b30ca251146c478759190d9b206f38c3b70d3 (diff) | |
| parent | 1161af80594c403233e3d21589af004ee2d75594 (diff) | |
Merge pull request #9803 from Techjar/bbox-videocommon
VideoCommon: Abstract bounding box
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/VKRenderer.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/VKRenderer.cpp | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/VKRenderer.cpp b/Source/Core/VideoBackends/Vulkan/VKRenderer.cpp index 4623094776..06a3f09518 100644 --- a/Source/Core/VideoBackends/Vulkan/VKRenderer.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKRenderer.cpp @@ -17,6 +17,7 @@ #include "VideoBackends/Vulkan/CommandBufferManager.h" #include "VideoBackends/Vulkan/ObjectCache.h" +#include "VideoBackends/Vulkan/StagingBuffer.h" #include "VideoBackends/Vulkan/StateTracker.h" #include "VideoBackends/Vulkan/VKBoundingBox.h" #include "VideoBackends/Vulkan/VKPerfQuery.h" @@ -63,13 +64,6 @@ bool Renderer::Initialize() if (!::Renderer::Initialize()) return false; - m_bounding_box = std::make_unique<BoundingBox>(); - if (!m_bounding_box->Initialize()) - { - PanicAlertFmt("Failed to initialize bounding box."); - return false; - } - // Various initialization routines will have executed commands on the command buffer. // Execute what we have done before beginning the first frame. ExecuteCommandBuffer(true, false); @@ -132,20 +126,9 @@ void Renderer::SetPipeline(const AbstractPipeline* pipeline) StateTracker::GetInstance()->SetPipeline(static_cast<const VKPipeline*>(pipeline)); } -u16 Renderer::BBoxReadImpl(int index) -{ - return static_cast<u16>(m_bounding_box->Get(index)); -} - -void Renderer::BBoxWriteImpl(int index, u16 value) -{ - m_bounding_box->Set(index, value); -} - -void Renderer::BBoxFlushImpl() +std::unique_ptr<BoundingBox> Renderer::CreateBoundingBox() const { - m_bounding_box->Flush(); - m_bounding_box->Invalidate(); + return std::make_unique<VKBoundingBox>(); } void Renderer::ClearScreen(const MathUtil::Rectangle<int>& rc, bool color_enable, bool alpha_enable, |
