From 9bd533ebe4cee1dfef9725f32fe0b9ca42f5680d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 5 Dec 2019 10:58:03 -0500 Subject: VideoCommon/BoundingBox: Make interface for querying bounding box data Rather than expose the bounding box members directly, we can instead provide an interface for code to use. This makes it nicer to transition from global data, as the interface function names are already in place. --- Source/Core/VideoBackends/Software/Tev.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'Source/Core/VideoBackends/Software/Tev.cpp') diff --git a/Source/Core/VideoBackends/Software/Tev.cpp b/Source/Core/VideoBackends/Software/Tev.cpp index 580ab58685..8d03cacac2 100644 --- a/Source/Core/VideoBackends/Software/Tev.cpp +++ b/Source/Core/VideoBackends/Software/Tev.cpp @@ -841,15 +841,8 @@ void Tev::Draw() EfbInterface::IncPerfCounterQuadCount(PQ_ZCOMP_OUTPUT); } - // branchless bounding box update - BoundingBox::coords[BoundingBox::LEFT] = - std::min((u16)Position[0], BoundingBox::coords[BoundingBox::LEFT]); - BoundingBox::coords[BoundingBox::RIGHT] = - std::max((u16)Position[0], BoundingBox::coords[BoundingBox::RIGHT]); - BoundingBox::coords[BoundingBox::TOP] = - std::min((u16)Position[1], BoundingBox::coords[BoundingBox::TOP]); - BoundingBox::coords[BoundingBox::BOTTOM] = - std::max((u16)Position[1], BoundingBox::coords[BoundingBox::BOTTOM]); + BoundingBox::Update(static_cast(Position[0]), static_cast(Position[0]), + static_cast(Position[1]), static_cast(Position[1])); #if ALLOW_TEV_DUMPS if (g_ActiveConfig.bDumpTevStages) -- cgit v1.2.3