ShaderGenerators: Remove unnecessary inline keywords

Static by itself is sufficient
This commit is contained in:
Lioncash 2015-12-26 17:56:06 -05:00
parent 8ce3a4aa70
commit c151fe582f
3 changed files with 17 additions and 17 deletions

View file

@ -24,11 +24,11 @@ static const char* primitives_d3d[] =
"triangle" "triangle"
}; };
template<class T> static inline void EmitVertex(T& out, const char* vertex, API_TYPE ApiType, bool first_vertex = false); template<class T> static void EmitVertex(T& out, const char* vertex, API_TYPE ApiType, bool first_vertex = false);
template<class T> static inline void EndPrimitive(T& out, API_TYPE ApiType); template<class T> static void EndPrimitive(T& out, API_TYPE ApiType);
template<class T> template<class T>
static inline T GenerateGeometryShader(u32 primitive_type, API_TYPE ApiType) static T GenerateGeometryShader(u32 primitive_type, API_TYPE ApiType)
{ {
T out; T out;
// Non-uid template parameters will write to the dummy data (=> gets optimized 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<class T> template<class T>
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) if (g_ActiveConfig.bWireFrame && first_vertex)
out.Write("\tif (i == 0) first = %s;\n", 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"); out.Write("\toutput.Append(ps);\n");
} }
template<class T> template<class T>
static inline void EndPrimitive(T& out, API_TYPE ApiType) static void EndPrimitive(T& out, API_TYPE ApiType)
{ {
if (g_ActiveConfig.bWireFrame) if (g_ActiveConfig.bWireFrame)
EmitVertex<T>(out, "first", ApiType); EmitVertex<T>(out, "first", ApiType);

View file

@ -154,14 +154,14 @@ static const char *tevRasTable[] =
static const char *tevCOutputTable[] = { "prev.rgb", "c0.rgb", "c1.rgb", "c2.rgb" }; static const char *tevCOutputTable[] = { "prev.rgb", "c0.rgb", "c1.rgb", "c2.rgb" };
static const char *tevAOutputTable[] = { "prev.a", "c0.a", "c1.a", "c2.a" }; static const char *tevAOutputTable[] = { "prev.a", "c0.a", "c1.a", "c2.a" };
template<class T> static inline void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, API_TYPE ApiType, const char swapModeTable[4][5]); template<class T> static void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, API_TYPE ApiType, const char swapModeTable[4][5]);
template<class T> static inline void WriteTevRegular(T& out, const char* components, int bias, int op, int clamp, int shift); template<class T> static void WriteTevRegular(T& out, const char* components, int bias, int op, int clamp, int shift);
template<class T> static inline void SampleTexture(T& out, const char *texcoords, const char *texswap, int texmap, API_TYPE ApiType); template<class T> static void SampleTexture(T& out, const char *texcoords, const char *texswap, int texmap, API_TYPE ApiType);
template<class T> static inline void WriteAlphaTest(T& out, pixel_shader_uid_data* uid_data, API_TYPE ApiType,DSTALPHA_MODE dstAlphaMode, bool per_pixel_depth); template<class T> static void WriteAlphaTest(T& out, pixel_shader_uid_data* uid_data, API_TYPE ApiType,DSTALPHA_MODE dstAlphaMode, bool per_pixel_depth);
template<class T> static inline void WriteFog(T& out, pixel_shader_uid_data* uid_data); template<class T> static void WriteFog(T& out, pixel_shader_uid_data* uid_data);
template<class T> template<class T>
static inline T GeneratePixelShader(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType) static T GeneratePixelShader(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType)
{ {
T out; T out;
const u32 components = VertexLoaderManager::g_current_components; const u32 components = VertexLoaderManager::g_current_components;
@ -657,7 +657,7 @@ static inline T GeneratePixelShader(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
template<class T> template<class T>
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); int texcoord = bpmem.tevorders[n/2].getTexCoord(n&1);
bool bHasTexCoord = (u32)texcoord < bpmem.genMode.numtexgens; 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<class T> template<class T>
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[] = const char *tevScaleTableLeft[] =
{ {
@ -994,7 +994,7 @@ static inline void WriteTevRegular(T& out, const char* components, int bias, int
} }
template<class T> template<class T>
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); out.SetConstantsUsed(C_TEXDIMS+texmap,C_TEXDIMS+texmap);
@ -1025,7 +1025,7 @@ static const char *tevAlphaFunclogicTable[] =
}; };
template<class T> template<class T>
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] = static const char *alphaRef[2] =
{ {
@ -1100,7 +1100,7 @@ static const char *tevFogFuncsTable[] =
}; };
template<class T> template<class T>
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; uid_data->fog_fsel = bpmem.fog.c_proj_fsel.fsel;
if (bpmem.fog.c_proj_fsel.fsel == 0) if (bpmem.fog.c_proj_fsel.fsel == 0)

View file

@ -12,7 +12,7 @@
#include "VideoCommon/VideoConfig.h" #include "VideoCommon/VideoConfig.h"
template<class T> template<class T>
static inline T GenerateVertexShader(API_TYPE api_type) static T GenerateVertexShader(API_TYPE api_type)
{ {
T out; T out;
const u32 components = VertexLoaderManager::g_current_components; const u32 components = VertexLoaderManager::g_current_components;