summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/EfbInterface.cpp
diff options
context:
space:
mode:
authormagumagu <magumagu9@gmail.com>2014-03-28 19:22:15 -0700
committermagumagu <magumagu9@gmail.com>2014-03-29 12:07:20 -0700
commit0661efea8456b32d88fa13103f8ed68509f2b69f (patch)
tree971ec9afbd3608a5b019db613346f73b112ef0a2 /Source/Core/VideoBackends/Software/EfbInterface.cpp
parent47d96e449a5fcee8280368b8ec72eab551b87d31 (diff)
Software backend: Delete forked PixelEngine.
Mostly just zapping a bunch of duplicated code; the only interesting thing going on here is the changes to the performance counter implementation.
Diffstat (limited to 'Source/Core/VideoBackends/Software/EfbInterface.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/EfbInterface.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/Core/VideoBackends/Software/EfbInterface.cpp b/Source/Core/VideoBackends/Software/EfbInterface.cpp
index c1ded19322..0eff1cd226 100644
--- a/Source/Core/VideoBackends/Software/EfbInterface.cpp
+++ b/Source/Core/VideoBackends/Software/EfbInterface.cpp
@@ -2,20 +2,24 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
+#include <algorithm>
+
#include "Common/Common.h"
#include "Core/HW/Memmap.h"
#include "VideoBackends/Software/BPMemLoader.h"
#include "VideoBackends/Software/EfbInterface.h"
-#include "VideoBackends/Software/SWPixelEngine.h"
#include "VideoCommon/LookUpTables.h"
+#include "VideoCommon/PixelEngine.h"
u8 efb[EFB_WIDTH*EFB_HEIGHT*6];
namespace EfbInterface
{
+ u32 perf_values[PQ_NUM_MEMBERS];
+
inline u32 GetColorOffset(u16 x, u16 y)
{
return (x + y * EFB_WIDTH) * 3;
@@ -434,10 +438,10 @@ namespace EfbInterface
}
// branchless bounding box update
- SWPixelEngine::pereg.boxLeft = SWPixelEngine::pereg.boxLeft>x?x:SWPixelEngine::pereg.boxLeft;
- SWPixelEngine::pereg.boxRight = SWPixelEngine::pereg.boxRight<x?x:SWPixelEngine::pereg.boxRight;
- SWPixelEngine::pereg.boxTop = SWPixelEngine::pereg.boxTop>y?y:SWPixelEngine::pereg.boxTop;
- SWPixelEngine::pereg.boxBottom = SWPixelEngine::pereg.boxBottom<y?y:SWPixelEngine::pereg.boxBottom;
+ PixelEngine::bbox[0] = std::min(x, PixelEngine::bbox[0]);
+ PixelEngine::bbox[1] = std::max(x, PixelEngine::bbox[1]);
+ PixelEngine::bbox[2] = std::min(y, PixelEngine::bbox[2]);
+ PixelEngine::bbox[3] = std::max(y, PixelEngine::bbox[3]);
}
void SetColor(u16 x, u16 y, u8 *color)