diff options
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexShaderGen.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp index 7a23cf1080..f00a6d760c 100644 --- a/Source/Core/VideoCommon/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/VertexShaderGen.cpp @@ -9,14 +9,16 @@ #include "VideoCommon/DriverDetails.h" #include "VideoCommon/LightingShaderGen.h" #include "VideoCommon/NativeVertexFormat.h" +#include "VideoCommon/VertexLoaderManager.h" #include "VideoCommon/VertexShaderGen.h" #include "VideoCommon/VideoConfig.h" static char text[16768]; template<class T> -static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_type) +static inline void GenerateVertexShader(T& out, API_TYPE api_type) { + const u32 components = VertexLoaderManager::g_current_components; // Non-uid template parameters will write to the dummy data (=> gets optimized out) vertex_shader_uid_data dummy_data; vertex_shader_uid_data* uid_data = out.template GetUidData<vertex_shader_uid_data>(); @@ -394,12 +396,12 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ } } -void GetVertexShaderUid(VertexShaderUid& object, u32 components, API_TYPE api_type) +void GetVertexShaderUid(VertexShaderUid& object, API_TYPE api_type) { - GenerateVertexShader<VertexShaderUid>(object, components, api_type); + GenerateVertexShader<VertexShaderUid>(object, api_type); } -void GenerateVertexShaderCode(ShaderCode& object, u32 components, API_TYPE api_type) +void GenerateVertexShaderCode(ShaderCode& object, API_TYPE api_type) { - GenerateVertexShader<ShaderCode>(object, components, api_type); + GenerateVertexShader<ShaderCode>(object, api_type); } |
