From f9753070162d7594590370842d263d4d9e22cb0a Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sun, 10 Aug 2014 15:37:01 -0400 Subject: [PATCH] TextureDecoder: Add some statics to some of our helper functions I know these are already inline, but this makes it more clear that they're helper functions to be used in this file only. --- .../VideoCommon/TextureDecoder_Generic.cpp | 28 +++++++++---------- .../Core/VideoCommon/TextureDecoder_x64.cpp | 28 +++++++++---------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Source/Core/VideoCommon/TextureDecoder_Generic.cpp b/Source/Core/VideoCommon/TextureDecoder_Generic.cpp index dd23e4f924..3808483742 100644 --- a/Source/Core/VideoCommon/TextureDecoder_Generic.cpp +++ b/Source/Core/VideoCommon/TextureDecoder_Generic.cpp @@ -60,7 +60,7 @@ struct DXTBlock u8 lines[4]; }; -inline void decodebytesC4_5A3_To_rgba32(u32 *dst, const u8 *src, int tlutaddr) +static inline void decodebytesC4_5A3_To_rgba32(u32 *dst, const u8 *src, int tlutaddr) { u16 *tlut = (u16*)(texMem + tlutaddr); for (int x = 0; x < 4; x++) @@ -71,7 +71,7 @@ inline void decodebytesC4_5A3_To_rgba32(u32 *dst, const u8 *src, int tlutaddr) } } -inline void decodebytesC4IA8_To_RGBA(u32* dst, const u8* src, int tlutaddr) +static inline void decodebytesC4IA8_To_RGBA(u32* dst, const u8* src, int tlutaddr) { u16* tlut = (u16*)(texMem+tlutaddr); for (int x = 0; x < 4; x++) @@ -82,7 +82,7 @@ inline void decodebytesC4IA8_To_RGBA(u32* dst, const u8* src, int tlutaddr) } } -inline void decodebytesC4RGB565_To_RGBA(u32* dst, const u8* src, int tlutaddr) +static inline void decodebytesC4RGB565_To_RGBA(u32* dst, const u8* src, int tlutaddr) { u16* tlut = (u16*)(texMem+tlutaddr); for (int x = 0; x < 4; x++) @@ -93,7 +93,7 @@ inline void decodebytesC4RGB565_To_RGBA(u32* dst, const u8* src, int tlutaddr) } } -inline void decodebytesC8_5A3_To_RGBA32(u32 *dst, const u8 *src, int tlutaddr) +static inline void decodebytesC8_5A3_To_RGBA32(u32 *dst, const u8 *src, int tlutaddr) { u16 *tlut = (u16*)(texMem + tlutaddr); for (int x = 0; x < 8; x++) @@ -103,7 +103,7 @@ inline void decodebytesC8_5A3_To_RGBA32(u32 *dst, const u8 *src, int tlutaddr) } } -inline void decodebytesC8IA8_To_RGBA(u32* dst, const u8* src, int tlutaddr) +static inline void decodebytesC8IA8_To_RGBA(u32* dst, const u8* src, int tlutaddr) { u16* tlut = (u16*)(texMem + tlutaddr); for (int x = 0; x < 8; x++) @@ -112,7 +112,7 @@ inline void decodebytesC8IA8_To_RGBA(u32* dst, const u8* src, int tlutaddr) } } -inline void decodebytesC8RGB565_To_RGBA(u32* dst, const u8* src, int tlutaddr) +static inline void decodebytesC8RGB565_To_RGBA(u32* dst, const u8* src, int tlutaddr) { u16* tlut = (u16*)(texMem + tlutaddr); for (int x = 0; x < 8; x++) @@ -121,7 +121,7 @@ inline void decodebytesC8RGB565_To_RGBA(u32* dst, const u8* src, int tlutaddr) } } -inline void decodebytesC14X2_5A3_To_RGBA(u32 *dst, const u16 *src, int tlutaddr) +static inline void decodebytesC14X2_5A3_To_RGBA(u32 *dst, const u16 *src, int tlutaddr) { u16 *tlut = (u16*)(texMem + tlutaddr); for (int x = 0; x < 4; x++) @@ -131,7 +131,7 @@ inline void decodebytesC14X2_5A3_To_RGBA(u32 *dst, const u16 *src, int tlutaddr) } } -inline void decodebytesC14X2IA8_To_RGBA(u32* dst, const u16* src, int tlutaddr) +static inline void decodebytesC14X2IA8_To_RGBA(u32* dst, const u16* src, int tlutaddr) { u16* tlut = (u16*)(texMem + tlutaddr); for (int x = 0; x < 4; x++) @@ -141,7 +141,7 @@ inline void decodebytesC14X2IA8_To_RGBA(u32* dst, const u16* src, int tlutaddr) } } -inline void decodebytesC14X2rgb565_To_RGBA(u32* dst, const u16* src, int tlutaddr) +static inline void decodebytesC14X2rgb565_To_RGBA(u32* dst, const u16* src, int tlutaddr) { u16* tlut = (u16*)(texMem + tlutaddr); for (int x = 0; x < 4; x++) @@ -151,7 +151,7 @@ inline void decodebytesC14X2rgb565_To_RGBA(u32* dst, const u16* src, int tlutadd } } -inline void decodebytesIA4RGBA(u32 *dst, const u8 *src) +static inline void decodebytesIA4RGBA(u32 *dst, const u8 *src) { for (int x = 0; x < 8; x++) { @@ -162,7 +162,7 @@ inline void decodebytesIA4RGBA(u32 *dst, const u8 *src) } } -inline void decodebytesRGB5A3rgba(u32 *dst, const u16 *src) +static inline void decodebytesRGB5A3rgba(u32 *dst, const u16 *src) { #if 0 for (int x = 0; x < 4; x++) @@ -175,7 +175,7 @@ inline void decodebytesRGB5A3rgba(u32 *dst, const u16 *src) #endif } -inline void decodebytesARGB8_4ToRgba(u32 *dst, const u16 *src, const u16 * src2) +static inline void decodebytesARGB8_4ToRgba(u32 *dst, const u16 *src, const u16 * src2) { #if 0 for (int x = 0; x < 4; x++) @@ -190,12 +190,12 @@ inline void decodebytesARGB8_4ToRgba(u32 *dst, const u16 *src, const u16 * src2) #endif } -inline u32 makeRGBA(int r, int g, int b, int a) +static inline u32 makeRGBA(int r, int g, int b, int a) { return (a<<24)|(b<<16)|(g<<8)|r; } -void decodeDXTBlockRGBA(u32 *dst, const DXTBlock *src, int pitch) +static void decodeDXTBlockRGBA(u32 *dst, const DXTBlock *src, int pitch) { // S3TC Decoder (Note: GCN decodes differently from PC so we can't use native support) // Needs more speed. diff --git a/Source/Core/VideoCommon/TextureDecoder_x64.cpp b/Source/Core/VideoCommon/TextureDecoder_x64.cpp index e9119ff1d1..0e7f284b2b 100644 --- a/Source/Core/VideoCommon/TextureDecoder_x64.cpp +++ b/Source/Core/VideoCommon/TextureDecoder_x64.cpp @@ -83,7 +83,7 @@ struct DXTBlock u8 lines[4]; }; -inline void decodebytesC4_5A3_To_rgba32(u32 *dst, const u8 *src, int tlutaddr) +static inline void decodebytesC4_5A3_To_rgba32(u32 *dst, const u8 *src, int tlutaddr) { u16 *tlut = (u16*)(texMem + tlutaddr); for (int x = 0; x < 4; x++) @@ -94,7 +94,7 @@ inline void decodebytesC4_5A3_To_rgba32(u32 *dst, const u8 *src, int tlutaddr) } } -inline void decodebytesC4IA8_To_RGBA(u32* dst, const u8* src, int tlutaddr) +static inline void decodebytesC4IA8_To_RGBA(u32* dst, const u8* src, int tlutaddr) { u16* tlut = (u16*)(texMem+tlutaddr); for (int x = 0; x < 4; x++) @@ -105,7 +105,7 @@ inline void decodebytesC4IA8_To_RGBA(u32* dst, const u8* src, int tlutaddr) } } -inline void decodebytesC4RGB565_To_RGBA(u32* dst, const u8* src, int tlutaddr) +static inline void decodebytesC4RGB565_To_RGBA(u32* dst, const u8* src, int tlutaddr) { u16* tlut = (u16*)(texMem+tlutaddr); for (int x = 0; x < 4; x++) @@ -116,7 +116,7 @@ inline void decodebytesC4RGB565_To_RGBA(u32* dst, const u8* src, int tlutaddr) } } -inline void decodebytesC8_5A3_To_RGBA32(u32 *dst, const u8 *src, int tlutaddr) +static inline void decodebytesC8_5A3_To_RGBA32(u32 *dst, const u8 *src, int tlutaddr) { u16 *tlut = (u16*)(texMem + tlutaddr); for (int x = 0; x < 8; x++) @@ -126,7 +126,7 @@ inline void decodebytesC8_5A3_To_RGBA32(u32 *dst, const u8 *src, int tlutaddr) } } -inline void decodebytesC8IA8_To_RGBA(u32* dst, const u8* src, int tlutaddr) +static inline void decodebytesC8IA8_To_RGBA(u32* dst, const u8* src, int tlutaddr) { u16* tlut = (u16*)(texMem + tlutaddr); for (int x = 0; x < 8; x++) @@ -135,7 +135,7 @@ inline void decodebytesC8IA8_To_RGBA(u32* dst, const u8* src, int tlutaddr) } } -inline void decodebytesC8RGB565_To_RGBA(u32* dst, const u8* src, int tlutaddr) +static inline void decodebytesC8RGB565_To_RGBA(u32* dst, const u8* src, int tlutaddr) { u16* tlut = (u16*)(texMem + tlutaddr); for (int x = 0; x < 8; x++) @@ -144,7 +144,7 @@ inline void decodebytesC8RGB565_To_RGBA(u32* dst, const u8* src, int tlutaddr) } } -inline void decodebytesC14X2_5A3_To_RGBA(u32 *dst, const u16 *src, int tlutaddr) +static inline void decodebytesC14X2_5A3_To_RGBA(u32 *dst, const u16 *src, int tlutaddr) { u16 *tlut = (u16*)(texMem + tlutaddr); for (int x = 0; x < 4; x++) @@ -154,7 +154,7 @@ inline void decodebytesC14X2_5A3_To_RGBA(u32 *dst, const u16 *src, int tlutaddr) } } -inline void decodebytesC14X2IA8_To_RGBA(u32* dst, const u16* src, int tlutaddr) +static inline void decodebytesC14X2IA8_To_RGBA(u32* dst, const u16* src, int tlutaddr) { u16* tlut = (u16*)(texMem + tlutaddr); for (int x = 0; x < 4; x++) @@ -164,7 +164,7 @@ inline void decodebytesC14X2IA8_To_RGBA(u32* dst, const u16* src, int tlutaddr) } } -inline void decodebytesC14X2rgb565_To_RGBA(u32* dst, const u16* src, int tlutaddr) +static inline void decodebytesC14X2rgb565_To_RGBA(u32* dst, const u16* src, int tlutaddr) { u16* tlut = (u16*)(texMem + tlutaddr); for (int x = 0; x < 4; x++) @@ -174,7 +174,7 @@ inline void decodebytesC14X2rgb565_To_RGBA(u32* dst, const u16* src, int tlutadd } } -inline void decodebytesIA4RGBA(u32 *dst, const u8 *src) +static inline void decodebytesIA4RGBA(u32 *dst, const u8 *src) { for (int x = 0; x < 8; x++) { @@ -185,7 +185,7 @@ inline void decodebytesIA4RGBA(u32 *dst, const u8 *src) } } -inline void decodebytesRGB5A3rgba(u32 *dst, const u16 *src) +static inline void decodebytesRGB5A3rgba(u32 *dst, const u16 *src) { #if 0 for (int x = 0; x < 4; x++) @@ -198,7 +198,7 @@ inline void decodebytesRGB5A3rgba(u32 *dst, const u16 *src) #endif } -inline void decodebytesARGB8_4ToRgba(u32 *dst, const u16 *src, const u16 * src2) +static inline void decodebytesARGB8_4ToRgba(u32 *dst, const u16 *src, const u16 * src2) { #if 0 for (int x = 0; x < 4; x++) @@ -213,7 +213,7 @@ inline void decodebytesARGB8_4ToRgba(u32 *dst, const u16 *src, const u16 * src2) #endif } -inline u32 makeRGBA(int r, int g, int b, int a) +static inline u32 makeRGBA(int r, int g, int b, int a) { return (a<<24)|(b<<16)|(g<<8)|r; } @@ -263,7 +263,7 @@ static void decodeDXTBlockRGBA(u32 *dst, const DXTBlock *src, int pitch) } #endif -inline void SetOpenMPThreadCount(int width, int height) +static inline void SetOpenMPThreadCount(int width, int height) { #ifdef _OPENMP // Don't use multithreading in small Textures