diff options
| author | Tony Wasserka <neobrainx@gmail.com> | 2014-08-12 11:59:21 +0200 |
|---|---|---|
| committer | Tony Wasserka <neobrainx@gmail.com> | 2014-08-12 11:59:21 +0200 |
| commit | d03e91962e9c7cb5a51693086df2ecaa50ec8c12 (patch) | |
| tree | 77ebbdf72b21419a3238d6ebb33d6096b3efb946 /Source/Core/VideoBackends/Software/EfbInterface.cpp | |
| parent | a46151e14690bdba78c5d8844e2c369b2c7a64e2 (diff) | |
| parent | bcd10bfda657d6af2d43c22de20b1d924e482b98 (diff) | |
Merge pull request #779 from lioncash/software-cleanup
Small software backend cleanup.
Diffstat (limited to 'Source/Core/VideoBackends/Software/EfbInterface.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/EfbInterface.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/Core/VideoBackends/Software/EfbInterface.cpp b/Source/Core/VideoBackends/Software/EfbInterface.cpp index bf405860bf..cd10922981 100644 --- a/Source/Core/VideoBackends/Software/EfbInterface.cpp +++ b/Source/Core/VideoBackends/Software/EfbInterface.cpp @@ -20,12 +20,12 @@ namespace EfbInterface { u32 perf_values[PQ_NUM_MEMBERS]; - inline u32 GetColorOffset(u16 x, u16 y) + static inline u32 GetColorOffset(u16 x, u16 y) { return (x + y * EFB_WIDTH) * 3; } - inline u32 GetDepthOffset(u16 x, u16 y) + static inline u32 GetDepthOffset(u16 x, u16 y) { return (x + y * EFB_WIDTH) * 3 + DEPTH_BUFFER_START; } @@ -498,7 +498,8 @@ namespace EfbInterface return &efb[GetColorOffset(x, y)]; } - void CopyToXFB(yuv422_packed* xfb_in_ram, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc, float Gamma) { + void CopyToXFB(yuv422_packed* xfb_in_ram, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc, float Gamma) + { // FIXME: We should do Gamma correction if (!xfb_in_ram) @@ -512,7 +513,8 @@ namespace EfbInterface // this assumes copies will always start on an even (YU) pixel and the // copy always has an even width, which might not be true. - if (left & 1 || right & 1) { + if (left & 1 || right & 1) + { WARN_LOG(VIDEO, "Trying to copy XFB to from unaligned EFB source"); // this will show up as wrongly encoded } @@ -557,8 +559,10 @@ namespace EfbInterface } // Like CopyToXFB, but we copy directly into the opengl colour texture without going via GameCube main memory or doing a yuyv conversion - void BypassXFB(u8* texture, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc, float Gamma) { - if (fbWidth*fbHeight > MAX_XFB_WIDTH*MAX_XFB_HEIGHT) { + void BypassXFB(u8* texture, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc, float Gamma) + { + if (fbWidth*fbHeight > MAX_XFB_WIDTH*MAX_XFB_HEIGHT) + { ERROR_LOG(VIDEO, "Framebuffer is too large: %ix%i", fbWidth, fbHeight); return; } |
