This change more than doubles build speed for both clean and incremental builds. This could further improved by better managing pch.h contents and separating dependency compilation.
- Debug clean build: 75s to 32s (~2.3× faster)
- Debug incremental: 8s to 4s (2.0× faster)
- Release clean build: 84s to 38s (~2.2× faster)
- Release incremental: 40s to 18s (~2.2× faster)
Problems with previous setup:
- pch.h was misused as a general-purpose utility header and included from other headers.
- Precompiled headers were never actually enabled in the build configuration.
- Including a putative PCH from other headers violates two fundamental requirements:
1. A PCH must be the first #include in a translation unit to be effective.
2. Including PCH candidates in other headers defeats the optimization and triggers excessive rebuilds.
Changes:
- Relocated global utility declarations from pch.h to new SysUtils.h
- Replaced all #include "pch.h" occurrences in header files with #include "SysUtils.h"
- Headers no longer include pch.h under any circumstances
- Enabled /Yc (Create PCH) on pch.cpp and /Yu (Use PCH) on remaining .cpp files
- Excluded ImGui build from precompiled headers. Ideally this should be compiled as a separate, statically linked dependency, but this is a problem for another time.
- Added #include "pch.h" as the **very first** non-comment line in all .cpp translation units
Also a more aggressive hud detection for those inputs to combat the vignette if someone is using FSR FG inputs and somehow hasn't disabled the vignette.
* Re-enabled FSR2 inputs as spoofing was the cause of crashing (or atleast the only one nowadays)
* Disabled Dxgi Spoofing as DLSS inputs require OptiPatcher to avoid artifacts/crashes anyway