AnyPS5/core
Dean Galvin 3886b7b31d perf(shader): hash only the recompiler's inputs into the shader cache version
SourceVersion hashed every libSceAgcDriver source, so any driver-only
change sent the shader disk cache cold: 88 of the last 200 merges on main
did; with the inputs below, 51 of them would have. It now covers:

- core/shader/recompiler/** (sources, headers, CMake);
- prx/libc/include/HostThreadLocal.hpp, the one header the recompiler
  includes from outside its directory (checked against the ninja deps);
- the checked-out commits of SPIRV-Headers and glslang, plus SPIRV-Tools
  when ANYPS5_ENABLE_SPIRV_TOOLS is on (the submodule HEAD files are build
  dependencies, so moving a submodule regenerates the version);
- the compiler, build type, architecture and C++ flags.

Everything else the driver passes to the recompiler arrives in the
RecompileRequest, which the per-entry key covers. Two build-time checks keep
that true, failing the version step with a message naming the file:

- a recompiler source that includes a project header outside the hashed set;
- a driver source that calls or using-declares a ShaderRecompiler name not
  on the reviewed list, pulls in the whole namespace, or sets an environment
  variable (which could flip a recompiler APS5_* switch behind the key).

APS5_* switches are collected from every hashed source. The version script
sets cmake_minimum_required: without it CMake 3.x runs it with CMP0054 OLD
and reads the quoted section names in its if() tests as variables.
2026-10-04 03:02:24 +13:00
..
Decoder Merge pull request #227 from adriadam10/feat/png-enc 2026-10-02 22:08:05 +03:00
libs perf(shader): hash only the recompiler's inputs into the shader cache version 2026-10-04 03:02:24 +13:00
relinker Merge pull request #222 from YossiYad/feat/windows-tls-load-registers 2026-10-02 10:06:12 +03:00
shader/recompiler perf(shader): hash only the recompiler's inputs into the shader cache version 2026-10-04 03:02:24 +13:00