Compilation changes

Few compile time attempts to speed things up

Swap include guards for pramga once
Change compile options in the cmakeLists for source
generate a pch

small tweaks
This commit is contained in:
marauder2k7 2026-05-21 23:55:35 +01:00
parent 0df3bea9ca
commit 68e762130d
1016 changed files with 2848 additions and 5532 deletions

View file

@ -19,28 +19,19 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#ifndef _ACCUFEATUREGLSL_H_
#define _ACCUFEATUREGLSL_H_
#ifndef _SHADERGEN_GLSL_SHADERFEATUREGLSL_H_
#pragma once
#include "shaderGen/GLSL/shaderFeatureGLSL.h"
#endif
#ifndef _LANG_ELEMENT_H_
#include "shaderGen/langElement.h"
#endif
#ifndef _GFXDEVICE_H_
#include "gfx/gfxDevice.h"
#endif
#ifndef _FEATUREMGR_H_
#include "shaderGen/featureMgr.h"
#endif
#ifndef _MATERIALFEATURETYPES_H_
#include "materials/materialFeatureTypes.h"
#endif
#ifndef _MATERIALFEATUREDATA_H_
#include "materials/materialFeatureData.h"
#endif
/// Accu texture
class AccuTexFeatGLSL : public ShaderFeatureGLSL
@ -181,5 +172,3 @@ public:
String getName() override { return "Accu Specular"; }
};
#endif

View file

@ -19,16 +19,13 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _BUMP_GLSL_H_
#define _BUMP_GLSL_H_
#ifndef _SHADERGEN_GLSL_SHADERFEATUREGLSL_H_
#include "shaderGen/GLSL/shaderFeatureGLSL.h"
#endif
#ifndef _LANG_ELEMENT_H_
#include "shaderGen/langElement.h"
#endif
struct RenderPassData;
class MultiLine;

View file

@ -1,21 +1,14 @@
#ifndef _SHADERGEN_GLSL_SHADERFEATUREGLSL_H_
#include "shaderGen/GLSL/shaderFeatureGLSL.h"
#endif
#ifndef _LANG_ELEMENT_H_
#include "shaderGen/langElement.h"
#endif
#ifndef _GFXDEVICE_H_
#include "gfx/gfxDevice.h"
#endif
#ifndef _FEATUREMGR_H_
#include "shaderGen/featureMgr.h"
#endif
#ifndef _MATERIALFEATURETYPES_H_
#include "materials/materialFeatureTypes.h"
#endif
#ifndef _MATERIALFEATUREDATA_H_
#include "materials/materialFeatureData.h"
#endif
#ifndef CUSTOMSHADERFEATURE_H
#include "shaderGen/customShaderFeature.h"

View file

@ -1,23 +1,15 @@
#pragma once
#ifndef _SHADERGEN_GLSL_SHADERFEATUREGLSL_H_
#include "shaderGen/GLSL/shaderFeatureGLSL.h"
#endif
#ifndef _LANG_ELEMENT_H_
#include "shaderGen/langElement.h"
#endif
#ifndef _GFXDEVICE_H_
#include "gfx/gfxDevice.h"
#endif
#ifndef _FEATUREMGR_H_
#include "shaderGen/featureMgr.h"
#endif
#ifndef _MATERIALFEATURETYPES_H_
#include "materials/materialFeatureTypes.h"
#endif
#ifndef _MATERIALFEATUREDATA_H_
#include "materials/materialFeatureData.h"
#endif
/// This should be the final feature on most pixel shaders which
/// encodes the color for the current HDR target format.

View file

@ -19,16 +19,12 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _DEPTH_GLSL_H_
#define _DEPTH_GLSL_H_
#ifndef _SHADERGEN_GLSL_SHADERFEATUREGLSL_H_
#include "shaderGen/GLSL/shaderFeatureGLSL.h"
#endif
#ifndef _SHADEROP_H_
#include "shaderGen/shaderOp.h"
#endif
#include "shaderGen/shaderOp.h"
class EyeSpaceDepthOutGLSL : public ShaderFeatureGLSL
{

View file

@ -19,15 +19,12 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _PARABOLOID_GLSL_H_
#define _PARABOLOID_GLSL_H_
#ifndef _SHADERGEN_GLSL_SHADERFEATUREGLSL_H_
#include "shaderGen/GLSL/shaderFeatureGLSL.h"
#endif
#ifndef _SHADEROP_H_
#include "shaderGen/shaderOp.h"
#endif
class GFXShaderConstHandle;

View file

@ -19,14 +19,11 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _SHADERCOMP_GLSL_H_
#define _SHADERCOMP_GLSL_H_
#ifndef _SHADERCOMP_H_
#include "shaderGen/shaderComp.h"
#endif
class VertPixelConnectorGLSL : public ShaderConnector
{

View file

@ -19,6 +19,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _SHADERGEN_GLSL_SHADERFEATUREGLSL_H_
#define _SHADERGEN_GLSL_SHADERFEATUREGLSL_H_

View file

@ -19,14 +19,11 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _SHADERGEN_GLSL_H_
#define _SHADERGEN_GLSL_H_
#ifndef _SHADERGEN_H_
#include "shaderGen/shaderGen.h"
#endif
class ShaderGenPrinterGLSL : public ShaderGenPrinter
{

View file

@ -19,28 +19,19 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _ACCUFEATUREHLSL_H_
#define _ACCUFEATUREHLSL_H_
#ifndef _SHADERGEN_HLSL_SHADERFEATUREHLSL_H_
#include "shaderGen/HLSL/shaderFeatureHLSL.h"
#endif
#ifndef _LANG_ELEMENT_H_
#include "shaderGen/langElement.h"
#endif
#ifndef _GFXDEVICE_H_
#include "gfx/gfxDevice.h"
#endif
#ifndef _FEATUREMGR_H_
#include "shaderGen/featureMgr.h"
#endif
#ifndef _MATERIALFEATURETYPES_H_
#include "materials/materialFeatureTypes.h"
#endif
#ifndef _MATERIALFEATUREDATA_H_
#include "materials/materialFeatureData.h"
#endif
/// Accu texture
class AccuTexFeatHLSL : public ShaderFeatureHLSL
@ -181,5 +172,3 @@ public:
String getName() override { return "Accu Specular"; }
};
#endif

View file

@ -19,16 +19,13 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _BUMP_HLSL_H_
#define _BUMP_HLSL_H_
#ifndef _SHADERGEN_HLSL_SHADERFEATUREHLSL_H_
#include "shaderGen/HLSL/shaderFeatureHLSL.h"
#endif
#ifndef _LANG_ELEMENT_H_
#include "shaderGen/langElement.h"
#endif
struct RenderPassData;
class MultiLine;

View file

@ -1,21 +1,14 @@
#ifndef _SHADERGEN_HLSL_SHADERFEATUREHLSL_H_
#include "shaderGen/HLSL/shaderFeatureHLSL.h"
#endif
#ifndef _LANG_ELEMENT_H_
#include "shaderGen/langElement.h"
#endif
#ifndef _GFXDEVICE_H_
#include "gfx/gfxDevice.h"
#endif
#ifndef _FEATUREMGR_H_
#include "shaderGen/featureMgr.h"
#endif
#ifndef _MATERIALFEATURETYPES_H_
#include "materials/materialFeatureTypes.h"
#endif
#ifndef _MATERIALFEATUREDATA_H_
#include "materials/materialFeatureData.h"
#endif
#ifndef CUSTOMSHADERFEATURE_H
#include "shaderGen/customShaderFeature.h"

View file

@ -1,23 +1,15 @@
#pragma once
#ifndef _SHADERGEN_HLSL_SHADERFEATUREHLSL_H_
#include "shaderGen/HLSL/shaderFeatureHLSL.h"
#endif
#ifndef _LANG_ELEMENT_H_
#include "shaderGen/langElement.h"
#endif
#ifndef _GFXDEVICE_H_
#include "gfx/gfxDevice.h"
#endif
#ifndef _FEATUREMGR_H_
#include "shaderGen/featureMgr.h"
#endif
#ifndef _MATERIALFEATURETYPES_H_
#include "materials/materialFeatureTypes.h"
#endif
#ifndef _MATERIALFEATUREDATA_H_
#include "materials/materialFeatureData.h"
#endif
/// This should be the final feature on most pixel shaders which
/// encodes the color for the current HDR target format.

View file

@ -19,16 +19,12 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _DEPTH_HLSL_H_
#define _DEPTH_HLSL_H_
#ifndef _SHADERGEN_HLSL_SHADERFEATUREHLSL_H_
#include "shaderGen/HLSL/shaderFeatureHLSL.h"
#endif
#ifndef _SHADEROP_H_
#include "shaderGen/shaderOp.h"
#endif
#include "shaderGen/shaderOp.h"
class EyeSpaceDepthOutHLSL : public ShaderFeatureHLSL
{

View file

@ -19,15 +19,12 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _PARABOLOID_HLSL_H_
#define _PARABOLOID_HLSL_H_
#ifndef _SHADERGEN_HLSL_SHADERFEATUREHLSL_H_
#include "shaderGen/HLSL/shaderFeatureHLSL.h"
#endif
#ifndef _SHADEROP_H_
#include "shaderGen/shaderOp.h"
#endif
class GFXShaderConstHandle;

View file

@ -19,14 +19,11 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _SHADERCOMP_HLSL_H_
#define _SHADERCOMP_HLSL_H_
#ifndef _SHADERCOMP_H_
#include "shaderGen/shaderComp.h"
#endif
class ShaderConnectorHLSL : public ShaderConnector
{

View file

@ -19,12 +19,10 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _SHADERGEN_HLSL_SHADERFEATUREHLSL_H_
#define _SHADERGEN_HLSL_SHADERFEATUREHLSL_H_
#ifndef _SHADERFEATURE_H_
#include "shaderGen/shaderFeature.h"
#endif
struct LangElement;
struct MaterialFeatureData;

View file

@ -19,14 +19,11 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _SHADERGEN_HLSL_H_
#define _SHADERGEN_HLSL_H_
#ifndef _SHADERGEN_H_
#include "shaderGen/shaderGen.h"
#endif
class ShaderGenPrinterHLSL : public ShaderGenPrinter
{

View file

@ -19,15 +19,11 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _CONDITIONER_BASE_H_
#define _CONDITIONER_BASE_H_
#ifndef _SHADERFEATURE_H_
#include "shaderGen/shaderFeature.h"
#endif
#ifndef _SHADER_DEPENDENCY_H_
#include "shaderGen/shaderDependency.h"
#endif
class MultiLine;
class ConditionerMethodDependency;

View file

@ -21,10 +21,7 @@
//-----------------------------------------------------------------------------
#ifndef CUSTOMSHADERFEATURE_H
#define CUSTOMSHADERFEATURE_H
#ifndef _SIMOBJECT_H_
#include "console/simObject.h"
#endif
#ifdef TORQUE_D3D11
class CustomFeatureHLSL;

View file

@ -19,19 +19,14 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _FEATUREMGR_H_
#define _FEATUREMGR_H_
#ifndef _TSINGLETON_H_
#include "core/util/tSingleton.h"
#endif
#ifndef _TVECTOR_H_
#include "core/util/tVector.h"
#endif
#ifndef _UTIL_DELEGATE_H_
#include "core/util/tVector.h"
#include "core/util/delegate.h"
#endif
class FeatureType;
class ShaderFeature;

View file

@ -19,16 +19,14 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _FEATURESET_H_
#define _FEATURESET_H_
#ifndef _TORQUE_STRING_H_
#include "core/util/str.h"
#endif
#ifndef _TVECTOR_H_
#include "core/util/tVector.h"
#endif
class FeatureType;

View file

@ -19,16 +19,13 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _FEATURETYPE_H_
#define _FEATURETYPE_H_
#ifndef _TVECTOR_H_
#include "core/util/tVector.h"
#endif
#ifndef _TORQUE_STRING_H_
#include "core/util/str.h"
#endif
class FeatureType;
class FeatureSet;

View file

@ -19,20 +19,14 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _LANG_ELEMENT_H_
#define _LANG_ELEMENT_H_
#ifndef _TVECTOR_H_
#include "core/util/tVector.h"
#endif
#ifndef _STREAM_H_
#include "core/stream/stream.h"
#endif
#ifndef _GFXENUMS_H_
#include "gfx/gfxEnums.h"
#endif
#define WRITESTR( a ){ stream.write( dStrlen(a), a ); }

View file

@ -19,16 +19,13 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _SHADERCOMP_H_
#define _SHADERCOMP_H_
#ifndef _TVECTOR_H_
#include "core/util/tVector.h"
#endif
#ifndef _MISCSHDRDAT_H_
#include "materials/miscShdrDat.h"
#endif
class Stream;
struct Var;

View file

@ -19,14 +19,11 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _SHADER_DEPENDENCY_H_
#define _SHADER_DEPENDENCY_H_
#ifndef _PATH_H_
#include "core/util/path.h"
#endif
class Stream;

View file

@ -19,18 +19,14 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _SHADERFEATURE_H_
#define _SHADERFEATURE_H_
#ifndef _MATERIALDEFINITION_H_
#include "materials/materialDefinition.h"
#endif
#ifndef _SHADERCOMP_H_
#include "shaderGen/shaderComp.h"
#endif
#ifndef _SHADER_DEPENDENCY_H_
#include "shaderGen/shaderDependency.h"
#endif
class MultiLine;
struct LangElement;

View file

@ -19,33 +19,25 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _SHADERGEN_H_
#define _SHADERGEN_H_
#ifndef _LANG_ELEMENT_H_
#include "shaderGen/langElement.h"
#endif
#ifndef _SHADERFEATURE_H_
#include "shaderGen/shaderFeature.h"
#endif
#ifndef _SHADERCOMP_H_
#include "shaderGen/shaderComp.h"
#endif
#ifndef _GFXDEVICE_H_
#include "gfx/gfxDevice.h"
#endif
#ifndef _AUTOPTR_H_
#include "core/util/autoPtr.h"
#endif
#ifndef _TSINGLETON_H_
#include "core/util/tSingleton.h"
#endif
#ifndef _VOLUME_H_
#include "core/volume.h"
#endif
#ifndef _MATERIALFEATUREDATA_H_
#include "materials/materialFeatureData.h"
#endif
/// Base class used by shaderGen to be API agnostic. Subclasses implement the various methods
/// in an API specific way.

View file

@ -19,12 +19,11 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _SHADERGENVARS_H_
#define _SHADERGENVARS_H_
#ifndef _TORQUE_STRING_H_
#include "core/util/str.h"
#endif
///
/// ShaderGenVars, predefined string names for variables that shadergen based shaders use, this avoids

View file

@ -19,12 +19,11 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _SHADEROP_H_
#define _SHADEROP_H_
#ifndef _LANG_ELEMENT_H_
#include "shaderGen/langElement.h"
#endif
//**************************************************************************
/*!