From 6de2129f9845586df013f1ece94eae7cd7b9e752 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 16 Mar 2014 23:03:07 -0700 Subject: [PATCH] softgpu: Don't re-pack 8888 colors. It's like a bad joke, but MSVC was not optimizing this out. --- GPU/Software/Colors.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/GPU/Software/Colors.h b/GPU/Software/Colors.h index 596a58758d..db32848d69 100644 --- a/GPU/Software/Colors.h +++ b/GPU/Software/Colors.h @@ -49,11 +49,16 @@ static inline u32 DecodeRGB565(u16 src) static inline u32 DecodeRGBA8888(u32 src) { +#if 1 + return src; +#else + // This is the order of the bits. u8 r = src & 0xFF; u8 g = (src >> 8) & 0xFF; u8 b = (src >> 16) & 0xFF; u8 a = (src >> 24) & 0xFF; return (a << 24) | (b << 16) | (g << 8) | r; +#endif } static inline u16 RGBA8888To565(u32 value)