From 505d45a2331e5587ca0b564ec616fc5855c33fd7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 18 May 2018 15:43:26 -0400 Subject: 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. --- Source/Core/VideoBackends/Software/EfbInterface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoBackends/Software/EfbInterface.cpp') 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) -- cgit v1.2.3