test(agc): bound the PM4 system counter by the time since main #28896
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/28896"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-12-04T14:38:46Z.
What
testGcnReleaseMemSystemCounterinagc_driver_pm4checked that the firstRELEASE_MEMDATA_SEL 4value was below 60 s of 800 MHz ticks. The driver counts those ticks fromGcnSystemCounterStart, which is set when the library loads. The check runs as the 34th of 63 cases in the default run, so it also needs the 33 cases before it to finish within 60 s of load.The nightly Sanitizers run takes longer than that:
agc_driver_pm4ran for 97.4 s in run 47261325393 (0b0c56dec5) and failed with "the GCN DATA_SEL 4 counter did not start near zero". The counter was right; the test was slow. The test is not in.github/sanitizer-known-failures.txt.The test now records when
mainstarts. It checks that the first value is at least the time frommainto the packet, and at most that time plus 60 s for start-up beforemain. That still fails a counter that starts at boot, at the epoch or aftermain. It no longer depends on how long the earlier cases took.Tested
On main
484b0368d3, with a temporary local patch (not part of this PR) that sleeps 61 s inmainbeforetestGcnReleaseMemSystemCounter, to stand in for the slow earlier cases:The Windows runs used
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationandVK_LOADER_DEBUG=layerwith layer 1.4.363.agc_driver_pm4creates no Vulkan instance, so the logs show no layer insert and noVUID-.check_conventions.pypassed andpr_overlap.py --branchfound no overlapping pull request.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-04T15:18:52Z.
Review: APPROVED
Reviewed — looks good
The counter is measured from library load, and the updated assertion accounts for elapsed time since
mainplus up to 60 seconds of earlier startup delay.What I ran
Reviewed head
52ef5d6061bf7ebf540e7fe33dfe0402fd5a3fcaagainst the providedmainbase; no merged preview was run. I usedrepo_read.pyto inspect the changed test,main, and the counter initialization and value calculation. No build or test was run.Results
Negative control
Not run; no test or source mutation was performed.
Findings
Blocking
None.
Non-blocking
None.
Sources
maintimestampNot verified
The reported Windows, WSL, sanitizer, and delayed-case runs were not reproduced. I read the changed test and
mainentry point inPm4.cpp, plus the counter implementation inExecution/src/Pm4.cpp; the remainder of the test file was not read.files.jsonlists one reviewed file and no excluded files.To get this to a good state
Nothing is required.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.