From 70663fec4247c5d8058170a13135d2dfd1990ca2 Mon Sep 17 00:00:00 2001 From: Niko Date: Tue, 13 Oct 2026 02:49:37 +0200 Subject: [PATCH] test(recompiler): check that APS5_NO_PERF_DISK_PLANS=1 is cache-neutral APS5_NO_PERF_DISK_PLANS=1 is listed as a neutral switch, so it stays out of the variant key, and it exists to compare warm starts with and without stored plans. Nothing tested either property: the cross-process test ran with the switch unset only. A fourth child process now sets the switch against the cache the first process filled. It must run the front end for all 14 fixtures, neither load nor store a plan, still hit all 14 stored variants, and produce the same SPIR-V, bindings, push constants, snapshots, read traces and plans as the first process. Co-Authored-By: Claude Opus 5.5 --- core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp b/core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp index abc30222b..4357cb9f0 100644 --- a/core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp +++ b/core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp @@ -1732,6 +1732,7 @@ std::filesystem::path planEntryPath(PlanFixture& fixture) { int runPlanLoadingProcess(std::string_view mode) { if (mode == "--load-plan-switch") setEnvironment("APS5_TRACE_BINDLESS", "1"); + if (mode == "--load-plan-off") setEnvironment("APS5_NO_PERF_DISK_PLANS", "1"); auto fixtures = planFixtures(); const auto count = fixtures.size(); std::vector> plans; @@ -1747,6 +1748,8 @@ int runPlanLoadingProcess(std::string_view mode) { } if (mode == "--load-plan") { require(builds == 0u && totals.planHits == count && totals.planMisses == 0u && totals.planLoadFailures == 0u && totals.hits == count && totals.misses == 0u, "the second process ran the front end" + counts); + } else if (mode == "--load-plan-off") { + require(builds == count && totals.planHits == 0u && totals.planMisses == 0u && totals.planWrites == 0u && totals.hits == count && totals.misses == 0u, "APS5_NO_PERF_DISK_PLANS=1 used the stored plans or missed the stored variants" + counts); } else { require(builds == 1u && totals.planHits == count - 1u && totals.planLoadFailures == 1u && totals.planWrites == 1u && totals.hits == count && totals.misses == 0u, "the damaged plan was not rejected and rebuilt alone" + counts); } @@ -1764,6 +1767,8 @@ int runPlanLoadingProcess(std::string_view mode) { const auto after = ShaderDiskCache::Totals(); require(FrontEndBuilds() == 1u && after.planHits == count && after.planMisses == 1u, "a changed code word reused a stored plan"); std::cout << "second process prepared " << count << " shaders from stored plans without running the front end\n"; + } else if (mode == "--load-plan-off") { + std::cout << "APS5_NO_PERF_DISK_PLANS=1 ran the front end for all " << count << " shaders with the same output\n"; } else { std::cout << "a damaged plan entry was rejected, rebuilt and stored again with the same output\n"; } @@ -1804,6 +1809,7 @@ void verifyPlanAcrossProcesses(const char* self) { require(std::system(command.c_str()) == 0, std::string("the process ") + mode + " failed"); }; run("--load-plan"); + run("--load-plan-off"); std::vector entry; const auto damaged = planEntryPath(fixtures.front()); require(ReadWholeFile(damaged, entry), "cannot read a stored plan entry");