From f5bf769522b6d9407c1b37011aa18bc0258481a9 Mon Sep 17 00:00:00 2001 From: Patryk Obara Date: Wed, 5 Feb 2020 05:11:38 +0100 Subject: [PATCH] Unifdef unused scaler implementations A number of "templated" scaler implementations are unused in the implementation. If any single one of them needs to be brought back (unlikely), then it's a simple matter of removing an ifdef. These templates turn off compilation of following scaler implementations: void Normal1x_9_8_L(const void*) void Normal1x_9_8_R(const void*) void Normal2x_9_8_L(const void*) void Normal2x_9_8_R(const void*) void Normal3x_9_8_L(const void*) void Normal3x_9_8_R(const void*) void NormalDw_9_8_L(const void*) void NormalDw_9_8_R(const void*) void NormalDh_9_8_L(const void*) void NormalDh_9_8_R(const void*) void HQ2x_15_L() void HQ2x_15_R() void HQ3x_15_L() void HQ3x_15_R() void Super2xSaI_15_L() void Super2xSaI_15_R() void SuperEagle_15_L() void SuperEagle_15_R() void _2xSaI_15_L() void _2xSaI_15_R() void AdvMame2x_15_L() void AdvMame2x_15_R() void AdvMame3x_15_L() void AdvMame3x_15_R() void Cache_9_8(const void*) --- src/gui/render_templates.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gui/render_templates.h b/src/gui/render_templates.h index 688b03a4..c249144c 100644 --- a/src/gui/render_templates.h +++ b/src/gui/render_templates.h @@ -181,6 +181,7 @@ #define D5 fc[+2 + SCALER_COMPLEXWIDTH] #define D6 fc[+2 + 2*SCALER_COMPLEXWIDTH] +#if (SBPP != 9) || (DBPP != 8) #if RENDER_USE_ADVANCED_SCALERS>1 static void conc3d(Cache,SBPP,DBPP) (const void * s) { @@ -241,7 +242,6 @@ static void conc3d(Cache,SBPP,DBPP) (const void * s) { } #endif - /* Simple scalers */ #define SCALERNAME Normal1x #define SCALERWIDTH 1 @@ -311,6 +311,8 @@ static void conc3d(Cache,SBPP,DBPP) (const void * s) { #undef SCALERHEIGHT #undef SCALERFUNC +#endif // (SBPP != 9) || (DBPP != 8) + #if (DBPP > 8) #if RENDER_USE_ADVANCED_SCALERS>0 @@ -437,6 +439,8 @@ static void conc3d(Cache,SBPP,DBPP) (const void * s) { #if (DBPP > 8) +#if (DBPP != 15) + #include "render_templates_hq.h" #define SCALERNAME HQ2x @@ -493,6 +497,8 @@ static void conc3d(Cache,SBPP,DBPP) (const void * s) { #undef SCALERHEIGHT #undef SCALERFUNC +#endif // (DBPP != 15) + #define SCALERNAME AdvInterp2x #define SCALERWIDTH 2 #define SCALERHEIGHT 2 @@ -540,6 +546,8 @@ static void conc3d(Cache,SBPP,DBPP) (const void * s) { #endif // #if (DBPP > 8) +#if (DBPP != 15) + #define SCALERNAME AdvMame2x #define SCALERWIDTH 2 #define SCALERHEIGHT 2 @@ -585,6 +593,7 @@ static void conc3d(Cache,SBPP,DBPP) (const void * s) { #undef SCALERHEIGHT #undef SCALERFUNC +#endif // (DBPP != 15) #endif // (SBPP == DBPP) && !defined (CACHEWITHPAL)