From ce8944f853d97fd0ab912b16ea91dce821042fcc Mon Sep 17 00:00:00 2001 From: Niko Date: Tue, 13 Oct 2026 17:44:42 +0200 Subject: [PATCH] test(recompiler): plan an invariant descriptor phi in the disk cache test The round trip requires some fixture to plan a phi, and only one did: the loop counter of "bindless sample in a loop latch", which reaches the plan through the latch condition. The counter is not invariant, so the CPU walk can never evaluate that condition. A plan that keeps only the conditions the walk can evaluate, as #5181 aims to, would hold no phi and fail the check with "no fixture plans a phi". "descriptor invariant phi" loads the image descriptor from the same SRT offset on both sides of a branch on an SRT dword. Its eight dwords are phis of equivalent reads: the tracker keeps them, since it splits only descriptor phis that are not invariant, and the walk evaluates them through the invariant read. The plan stores them as descriptor dwords, whichever conditions it keeps, so the phi encoding stays covered. The fixture goes after the other compute fixtures, so they keep their seeds and their damaged-entry checks. Co-Authored-By: Claude Opus 5.5 --- core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp b/core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp index 4357cb9f0..db7a70c63 100644 --- a/core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp +++ b/core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp @@ -1203,6 +1203,7 @@ std::vector planFixtures() { chained[7] = static_cast(PlanPointerAddress >> 32u); add("guarded pointer chain", 64, {0xf4080100u, 0xfa000000u, 0xf4000200u, 0xfa000010u, 0xf4040280u, 0xfa000018u, 0xbe8c03ffu, 0x11111111u, 0xbf8cc07fu, 0xbf068008u, 0xbf850006u, 0xf4040385u, 0xfa000000u, 0xbf8cc07fu, 0xf4000307u, 0xfa000000u, 0xbf8cc07fu, 0x7e02020cu, 0x34040082u, 0xe0701000u, 0x80010102u, 0xbf810000u}, srtPointer, {{PlanSrtAddress, chained}, {PlanPayloadAddress, payload}, {PlanPointerAddress, {static_cast(PlanPayloadAddress), static_cast(PlanPayloadAddress >> 32u)}}}); add("descriptor through a pointer", 64, {0xf4040280u, 0xfa000018u, 0xbf8cc07fu, 0xf4080105u, 0xfa000000u, 0xbf8cc07fu, 0x34040082u, 0xe0701000u, 0x80010002u, 0xbf810000u}, srtPointer, {{PlanSrtAddress, chained}, {PlanPointerAddress, bufferWords(PlanOutputAddress, 0u, 256u, 0x30027facu)}}); + add("descriptor invariant phi", 32, {0xf4000400u, 0xfa000050u, 0xf4080500u, 0xfa000020u, 0xbf8cc07fu, 0xbf068010u, 0xbf850003u, 0xf40c0200u, 0xfa000000u, 0xbf820002u, 0xf40c0200u, 0xfa000000u, 0xf4080600u, 0xfa000040u, 0xbf8cc07fu, 0xf09c0f08u, 0x00a20000u, 0xbf8c3f70u, 0xe0700000u, 0x80060000u, 0xbf810000u}, srtPointer, {{PlanSrtAddress, phis}}); PlanFixture fragment; fragment.name = "fragment parameters";