diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 39b8094299..3934f75db8 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -304,6 +304,7 @@ jobs: tests/startup_compute_request_offline_check.py \ tests/compute_container_index_check.py \ tests/startup_shader_cache_rekey_check.py \ + tests/startup_shader_cache_revision_check.py \ tests/startup_gfx2hlsl_scalar_m0_check.py \ tests/startup_gfx2hlsl_waitcnt_depctr_check.py \ tests/startup_mesh57_skeleton_check.py \ diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c838ba024..3231fbb855 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5096,6 +5096,9 @@ if(EXISTS "${INTAKE_PYTHON}") "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_shader_cache_rekey_check.py") add_test(NAME runtime_shader_cache_rekey_cli_check COMMAND "${INTAKE_PYTHON}" -B "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_shader_cache_rekey_cli_check.py") + # The launchers' warning when the shader cache and the translator come from different revisions (#2815). + add_test(NAME startup_shader_cache_revision COMMAND "${INTAKE_PYTHON}" -B + "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_shader_cache_revision_check.py") # Partial colour exports carry their channel mask to the manifest; compressed exports of whole pairs lower (#1674). add_test(NAME startup_gfx2hlsl_export_mask COMMAND "${INTAKE_PYTHON}" -B "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_gfx2hlsl_export_mask_check.py") diff --git a/docs/startup-runtime.md b/docs/startup-runtime.md index 976eb0a8a2..c75b658f51 100644 --- a/docs/startup-runtime.md +++ b/docs/startup-runtime.md @@ -1601,7 +1601,16 @@ handle returns `0x80004005`. The startup shader cache key includes the translator revision. After updating from an earlier translation revision, run the recording build once to emit requests, run `python tools/startup/gfx2hlsl.py --pending `, -then start the build again. The new key keeps the former bytecode and manifest +then start the build again. +The first request of a process also writes the runtime's revisions to `/revision.txt` +(`graphics`, `compute` and `mesh57` lines). With `-Render -Translate` (`--render --translate`), +`run.ps1` and `run.sh` compare that file with the `gfx2hlsl.py` they start +(`tools/startup/shader_cache_revision.py`) and print one warning naming both revisions when they differ, +or when the cache holds requests but no `revision.txt`: every cached request would be refused as a key +mismatch. The warning comes before the watcher starts, or after the run when the run's own stand-ins +wrote the first `revision.txt`. Rebuild the stand-ins from the same checkout, or start with an empty cache: +`-FreshShaderCache` (`--fresh-shader-cache`) moves a cache that is not empty to `.old--