diff options
| author | Lioncash <mathew1800@gmail.com> | 2018-05-18 15:43:26 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2018-05-18 16:23:34 -0400 |
| commit | 505d45a2331e5587ca0b564ec616fc5855c33fd7 (patch) | |
| tree | 0c8974b6d5f18bf5d17b924b8bdb63acd89be652 /Source/Core/VideoBackends/Software | |
| parent | 5eef8ba9844806a795a635c6e364e3b9edc9a6c8 (diff) | |
EfbInterface: Move buffer constant from the header to the cpp file
This is only ever used internally, so we can limit its scope to the only
usage point.
Diffstat (limited to 'Source/Core/VideoBackends/Software')
| -rw-r--r-- | Source/Core/VideoBackends/Software/EfbInterface.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Software/EfbInterface.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Software/EfbInterface.cpp b/Source/Core/VideoBackends/Software/EfbInterface.cpp index a133d63c2f..bb3cfeda90 100644 --- a/Source/Core/VideoBackends/Software/EfbInterface.cpp +++ b/Source/Core/VideoBackends/Software/EfbInterface.cpp @@ -32,7 +32,9 @@ static inline u32 GetColorOffset(u16 x, u16 y) static inline u32 GetDepthOffset(u16 x, u16 y) { - return (x + y * EFB_WIDTH) * 3 + DEPTH_BUFFER_START; + constexpr u32 depth_buffer_start = EFB_WIDTH * EFB_HEIGHT * 3; + + return (x + y * EFB_WIDTH) * 3 + depth_buffer_start; } static void SetPixelAlphaOnly(u32 offset, u8 a) diff --git a/Source/Core/VideoBackends/Software/EfbInterface.h b/Source/Core/VideoBackends/Software/EfbInterface.h index 1c8093b1bc..518395d7c9 100644 --- a/Source/Core/VideoBackends/Software/EfbInterface.h +++ b/Source/Core/VideoBackends/Software/EfbInterface.h @@ -10,8 +10,6 @@ namespace EfbInterface { -const int DEPTH_BUFFER_START = EFB_WIDTH * EFB_HEIGHT * 3; - // xfb color format - packed so the compiler doesn't mess with alignment #pragma pack(push, 1) struct yuv422_packed |
