From 99d3e489ea33fefd61715289959e852f69973117 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Mon, 30 Jan 2023 03:40:15 +1300 Subject: Move BoundingBox out of RenderBase They were essentially just pass-though methods --- Source/Core/VideoCommon/BoundingBox.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/BoundingBox.cpp') diff --git a/Source/Core/VideoCommon/BoundingBox.cpp b/Source/Core/VideoCommon/BoundingBox.cpp index 0429559846..ffc85d824c 100644 --- a/Source/Core/VideoCommon/BoundingBox.cpp +++ b/Source/Core/VideoCommon/BoundingBox.cpp @@ -29,7 +29,7 @@ void BoundingBox::Disable(PixelShaderManager& pixel_shader_manager) void BoundingBox::Flush() { - if (!g_ActiveConfig.backend_info.bSupportsBBox) + if (!g_ActiveConfig.bBBoxEnable || !g_ActiveConfig.backend_info.bSupportsBBox) return; m_is_valid = false; @@ -76,6 +76,9 @@ u16 BoundingBox::Get(u32 index) { ASSERT(index < NUM_BBOX_VALUES); + if (!g_ActiveConfig.bBBoxEnable || !g_ActiveConfig.backend_info.bSupportsBBox) + return m_bounding_box_fallback[index]; + if (!m_is_valid) Readback(); @@ -86,6 +89,12 @@ void BoundingBox::Set(u32 index, u16 value) { ASSERT(index < NUM_BBOX_VALUES); + if (!g_ActiveConfig.bBBoxEnable || !g_ActiveConfig.backend_info.bSupportsBBox) + { + m_bounding_box_fallback[index] = value; + return; + } + if (m_is_valid && m_values[index] == value) return; @@ -98,6 +107,7 @@ void BoundingBox::Set(u32 index, u16 value) // Nonetheless, it has been designed to be as safe as possible. void BoundingBox::DoState(PointerWrap& p) { + p.DoArray(m_bounding_box_fallback); p.Do(m_is_active); p.DoArray(m_values); p.DoArray(m_dirty); -- cgit v1.2.3