Repository navigation
fix(agc): accept the REWIND offload-enable payload bit - #7867
Conversation
A REWIND packet's payload carries a valid bit (31) and an offload-enable bit (24) that lets the CP offload polling of the valid bit. The validator rejected every bit but 31, so a title that writes both (0x81000000, PPSA15246) stopped with 'unsupported REWIND payload bits'. The driver waits on bit 31 only, so bit 24 needs no other handling. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
fogydes
left a comment
There was a problem hiding this comment.
Verified on Windows 11 with MinGW-w64 GCC 15.2.0 (Release):
- Architecture & Diff: In
core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp, allowingRewindOffloadEnable(0x01000000u, bit 24) alongsideRewindValid(0x80000000u, bit 31) inPm4::Validatealigns packet validation with CP offload polling semantics seen in PPSA15246 without altering driver wait behavior inexecuteRewindTail. - Unit Testing: Verified
testRewindPayloadBitsincore/libs/prx/libSceAgcDriver/tests/Pm4.cpp. Built and ranctest --test-dir build-libs -R "^agc_driver_pm4$" -Vpassing in 0.24s:All catalog, register, state, memory, and conditional execution fixtures passed.1/1 Test #422: agc_driver_pm4 ................... Passed 0.24 sec - Conventions: No code comments added;
tools/check_conventions.pypasses cleanly.
|
AMD and Intel Windows data: with this PR's test changes, Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built,
AI-assisted: yes (Claude Code) |
|
Checked the validator change against shadPS4 |
What
Pm4::Validaterejects a REWIND packet whose payload has any bit other than bit 31 set (unsupported REWIND payload bits,Pm4.cpp). PPSA15246 writes0x81000000: bit 31 (valid) and bit 24. shadPS4'sPM4CmdRewind(src/video_core/amdgpu/pm4_cmds.h) describes the payload as two fields, bit 31valid("subsequent packets are valid") and bit 24offload_enable(lets the CP offload polling of the valid bit to the IQ), and itsValid()tests bit 31 only. KytyPS5'sCpOpRewind(src/graphics/guest_gpu/command_processor/pm4Handlers.cpp) accepts exactly bits 31 and 24 of the payload, stops with a not-implemented error on any other bit, and waits on bit 31 only. The driver here also waits on bit 31 only (executeRewindTail), so bit 24 needs no handling beyond being accepted.This lets the validator accept bit 24 together with bit 31 and keeps rejecting every other bit. New
testRewindPayloadBitscases inagc_driver_pm4_tests:0x00000000,0x80000000,0x01000000and0x81000000validate;0x82000000,0x80000001and0x00800000are still rejected.Title evidence: PPSA15246 (Teardown), Windows 10,
main3ddbc4accplus an unmerged local change that lets a zero header word through (run_062434.err, line 149):driver failure: AGC driver: REWIND at DWORD 190: unsupported REWIND payload bits, dump dwordsc0005900 81000000. On unmodifiedmainthis title stops earlier, atunsupported PM4 packet type: header 0x00000000 at DWORD 15, in front of a 169-dword prefix of zeros; that stop is not changed here, so this PR alone does not get Teardown further. It removes the next one.Tested
Windows 10 (10.0.19045.6466), MinGW-w64 GCC 15.2.0 (WinLibs), Release, on
main7a36de66b9+ this commit (rebased afterwards onto77b3edf32aasc0b68e443; no commit in between touches the changed files):ctest -N -R '^agc_driver_pm4$'lists exactly one test;ctest -R '^agc_driver_pm4$' --no-tests=error: passes 3 of 3 (testRewindPayloadBitsincluded).Execution/src/Pm4.cpprestored tomain(git checkout upstream/main -- <file>,git statusshows only that file staged, 1 insertion / 1 deletion; the new test kept): the same ctest entry fails 3 of 3 (ctest exit code 8).python tools/check_conventions.py --base upstream/mainwith this title and body passes.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)AI-assisted (Claude Code).
🤖 Generated with Claude Code