From c151fe582f3b9f893650d14239d56eb4d24cbab3 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 26 Dec 2015 17:56:06 -0500 Subject: [PATCH] ShaderGenerators: Remove unnecessary inline keywords Static by itself is sufficient --- Source/Core/VideoCommon/GeometryShaderGen.cpp | 10 ++++----- Source/Core/VideoCommon/PixelShaderGen.cpp | 22 +++++++++---------- Source/Core/VideoCommon/VertexShaderGen.cpp | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Source/Core/VideoCommon/GeometryShaderGen.cpp b/Source/Core/VideoCommon/GeometryShaderGen.cpp index 5bb1c4906c..9c1ccd3071 100644 --- a/Source/Core/VideoCommon/GeometryShaderGen.cpp +++ b/Source/Core/VideoCommon/GeometryShaderGen.cpp @@ -24,11 +24,11 @@ static const char* primitives_d3d[] = "triangle" }; -template static inline void EmitVertex(T& out, const char* vertex, API_TYPE ApiType, bool first_vertex = false); -template static inline void EndPrimitive(T& out, API_TYPE ApiType); +template static void EmitVertex(T& out, const char* vertex, API_TYPE ApiType, bool first_vertex = false); +template static void EndPrimitive(T& out, API_TYPE ApiType); template -static inline T GenerateGeometryShader(u32 primitive_type, API_TYPE ApiType) +static T GenerateGeometryShader(u32 primitive_type, API_TYPE ApiType) { T out; // Non-uid template parameters will write to the dummy data (=> gets optimized out) @@ -284,7 +284,7 @@ static inline T GenerateGeometryShader(u32 primitive_type, API_TYPE ApiType) } template -static inline void EmitVertex(T& out, const char* vertex, API_TYPE ApiType, bool first_vertex) +static void EmitVertex(T& out, const char* vertex, API_TYPE ApiType, bool first_vertex) { if (g_ActiveConfig.bWireFrame && first_vertex) out.Write("\tif (i == 0) first = %s;\n", vertex); @@ -305,7 +305,7 @@ static inline void EmitVertex(T& out, const char* vertex, API_TYPE ApiType, bool out.Write("\toutput.Append(ps);\n"); } template -static inline void EndPrimitive(T& out, API_TYPE ApiType) +static void EndPrimitive(T& out, API_TYPE ApiType) { if (g_ActiveConfig.bWireFrame) EmitVertex(out, "first", ApiType); diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index c647e35179..957c0b0fe7 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -154,14 +154,14 @@ static const char *tevRasTable[] = static const char *tevCOutputTable[] = { "prev.rgb", "c0.rgb", "c1.rgb", "c2.rgb" }; static const char *tevAOutputTable[] = { "prev.a", "c0.a", "c1.a", "c2.a" }; -template static inline void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, API_TYPE ApiType, const char swapModeTable[4][5]); -template static inline void WriteTevRegular(T& out, const char* components, int bias, int op, int clamp, int shift); -template static inline void SampleTexture(T& out, const char *texcoords, const char *texswap, int texmap, API_TYPE ApiType); -template static inline void WriteAlphaTest(T& out, pixel_shader_uid_data* uid_data, API_TYPE ApiType,DSTALPHA_MODE dstAlphaMode, bool per_pixel_depth); -template static inline void WriteFog(T& out, pixel_shader_uid_data* uid_data); +template static void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, API_TYPE ApiType, const char swapModeTable[4][5]); +template static void WriteTevRegular(T& out, const char* components, int bias, int op, int clamp, int shift); +template static void SampleTexture(T& out, const char *texcoords, const char *texswap, int texmap, API_TYPE ApiType); +template static void WriteAlphaTest(T& out, pixel_shader_uid_data* uid_data, API_TYPE ApiType,DSTALPHA_MODE dstAlphaMode, bool per_pixel_depth); +template static void WriteFog(T& out, pixel_shader_uid_data* uid_data); template -static inline T GeneratePixelShader(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType) +static T GeneratePixelShader(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType) { T out; const u32 components = VertexLoaderManager::g_current_components; @@ -657,7 +657,7 @@ static inline T GeneratePixelShader(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType template -static inline void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, API_TYPE ApiType, const char swapModeTable[4][5]) +static void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, API_TYPE ApiType, const char swapModeTable[4][5]) { int texcoord = bpmem.tevorders[n/2].getTexCoord(n&1); bool bHasTexCoord = (u32)texcoord < bpmem.genMode.numtexgens; @@ -941,7 +941,7 @@ static inline void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, AP } template -static inline void WriteTevRegular(T& out, const char* components, int bias, int op, int clamp, int shift) +static void WriteTevRegular(T& out, const char* components, int bias, int op, int clamp, int shift) { const char *tevScaleTableLeft[] = { @@ -994,7 +994,7 @@ static inline void WriteTevRegular(T& out, const char* components, int bias, int } template -static inline void SampleTexture(T& out, const char *texcoords, const char *texswap, int texmap, API_TYPE ApiType) +static void SampleTexture(T& out, const char *texcoords, const char *texswap, int texmap, API_TYPE ApiType) { out.SetConstantsUsed(C_TEXDIMS+texmap,C_TEXDIMS+texmap); @@ -1025,7 +1025,7 @@ static const char *tevAlphaFunclogicTable[] = }; template -static inline void WriteAlphaTest(T& out, pixel_shader_uid_data* uid_data, API_TYPE ApiType, DSTALPHA_MODE dstAlphaMode, bool per_pixel_depth) +static void WriteAlphaTest(T& out, pixel_shader_uid_data* uid_data, API_TYPE ApiType, DSTALPHA_MODE dstAlphaMode, bool per_pixel_depth) { static const char *alphaRef[2] = { @@ -1100,7 +1100,7 @@ static const char *tevFogFuncsTable[] = }; template -static inline void WriteFog(T& out, pixel_shader_uid_data* uid_data) +static void WriteFog(T& out, pixel_shader_uid_data* uid_data) { uid_data->fog_fsel = bpmem.fog.c_proj_fsel.fsel; if (bpmem.fog.c_proj_fsel.fsel == 0) diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp index ba9fdb3493..029767f185 100644 --- a/Source/Core/VideoCommon/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/VertexShaderGen.cpp @@ -12,7 +12,7 @@ #include "VideoCommon/VideoConfig.h" template -static inline T GenerateVertexShader(API_TYPE api_type) +static T GenerateVertexShader(API_TYPE api_type) { T out; const u32 components = VertexLoaderManager::g_current_components;