From 86f8768268d58d6f5b11bcb74011c0af8159cde7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 22 Dec 2019 13:40:40 -0500 Subject: VideoCommon/ShaderGenCommon: Make template functions regular functions These are only ever used with ShaderCode instances and nothing else. Given that, we can convert these helper functions to expect that type of object as an argument and remove the need for templates, improving compiler throughput a marginal amount, as the template instantiation process doesn't need to be performed. We can also move the definitions of these functions into the cpp file, which allows us to remove a few inclusions from the ShaderGenCommon header. This uncovered a few instances of indirect inclusions being relied upon in other source files. One other benefit is this allows changes to be made to the definitions of the functions without needing to recompile all translation units that make use of these functions, making change testing a little quicker. Moving the definitions into the cpp file also allows us to completely hide DefineOutputMember() from external view, given it's only ever used inside of GenerateVSOutputMembers(). --- Source/Core/VideoCommon/FramebufferManager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/FramebufferManager.cpp') diff --git a/Source/Core/VideoCommon/FramebufferManager.cpp b/Source/Core/VideoCommon/FramebufferManager.cpp index 0aeb691362..344a6e2b64 100644 --- a/Source/Core/VideoCommon/FramebufferManager.cpp +++ b/Source/Core/VideoCommon/FramebufferManager.cpp @@ -3,9 +3,8 @@ // Refer to the license.txt file included. #include "VideoCommon/FramebufferManager.h" + #include -#include "VideoCommon/FramebufferShaderGen.h" -#include "VideoCommon/VertexManagerBase.h" #include "Common/ChunkFile.h" #include "Common/Logging/Log.h" @@ -17,7 +16,10 @@ #include "VideoCommon/AbstractStagingTexture.h" #include "VideoCommon/AbstractTexture.h" #include "VideoCommon/DriverDetails.h" +#include "VideoCommon/FramebufferShaderGen.h" #include "VideoCommon/RenderBase.h" +#include "VideoCommon/VertexManagerBase.h" +#include "VideoCommon/VideoCommon.h" #include "VideoCommon/VideoConfig.h" // Maximum number of pixels poked in one batch * 6 -- cgit v1.2.3