diff options
| author | Scott Mansell <phiren@gmail.com> | 2023-01-30 03:40:15 +1300 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2023-01-31 19:41:24 +1300 |
| commit | 99d3e489ea33fefd61715289959e852f69973117 (patch) | |
| tree | 96a8e4744925f663dba624c0b5ee373e6c808e63 /Source/Core/VideoCommon/BoundingBox.cpp | |
| parent | 35a69cb1bbce567eeae8fb8eece0062a782e436d (diff) | |
Move BoundingBox out of RenderBase
They were essentially just pass-though methods
Diffstat (limited to 'Source/Core/VideoCommon/BoundingBox.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/BoundingBox.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
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); |
