fix(pad): capture touch contact IDs with input samples #6485
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6485"
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 Ondra97 on 2026-10-15T17:06:43Z.
What
I reproduced touch contact IDs changing when a title drains older
scePadReadsamples after reading the current state. IDs were assigned while serializing samples, so reading an older release could change the identity of a still-held contact. A release and a new contact between reads could also reuse the old ID.Assign IDs when input is published under the existing mutex and capture them with queued samples. The regression covers partial history reads, contact replacement, two-finger contacts, queue rollover and movement of a held contact. Timestamp behavior is unchanged.
Tested
Exact committed head:
75d4c11b343a61d9dfa8b3ce30839cefeb31026f. Tested upstream main snapshot:0029e62f974c453a5f6c7333f3bdb13e770e3903.During publication main advanced to
fa9365ca74acae7c594618b0a857365774cc6f45. I compared its changes and checked a clean merge for this branch; none changes this fix's source or regression. The local results below belong to the exact tested head above, not to an untested synthetic merge with the newer main. Full merged-head CI remains for collaborator dispatch.This branch is stacked on the unchanged original commit
4fe92c9c23c7bd861d63664d4efde3033b6226f6from #6452, with its original author retained. That prerequisite fixes the current main's unrelated Windows fixture build failure (alignas(65536)exceeds the COFF maximum 8192). Merge #6452 first; this PR's own commit changes only its two runtime/regression files. The passing builds below include the prerequisite, with no test exclusions or private dependency changes.cmake --build build-team-worker-3-runtime --parallel. All 5/5 selected CPU/library tests passed without skips:patched_libraries,guest_pad,guest_pad_vibration_mode,pad_input_mapping,pad_keyboard_mouse. Conventions, committed whitespace, strict main synchronization and test-registration checks passed.agc_driver_gpu_indirect_arguments_misaligned_writer_aheadpassed on the exact head above, on NVIDIA GeForce RTX 4070 Ti SUPER, Windows driver 32.0.16.1714, Windows 11 Pro 10.0.26300.ANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1; the log confirms the selected physical device. One executed test, no skip. This checks the inherited fixture from #6452, not a rendering-performance or game result.guest_pad,guest_pad_vibration_mode,pad_input_mapping,pad_keyboard_mouse. Source content was verified against the final committed Git blobs and common dependency revisions.Real-runtime negative controls failed at
reading an older sample changed the current held contact IDon Windows mainf633042dfdf0d51f4af58fafbade3fa9d47fd169and Linux main92e50418f33b8950ceea950cb37331a941f5be0e; applying the production correction passed. The Pad source and regression are unchanged by the rebases. On the final committed Linux head,guest_padalso passed three consecutive repetitions.92e50418guest_padtestsI manually compared the related implementations and tests. #6337 changes fresh-sample timestamps independently. A separate Linux composition of the identical Pad sources from pre-rebase
68c8a853with #6337 at279fee87a077f413daa950deb73c2940232f0a3bpassed 4/4 input tests; its timestamp regression failed when its two-line correction was omitted. Restoring the standalone touch-ID sources passed 4/4 again. This is Linux source-composition evidence, not a combined Windows result. I propose this PR first, then #6337 rebased retaining bothnowandtouchIds; author agreement is pending. #6044 moves the shared test file and needs the regression preserved after relocation.No full Linux application/all-libraries build, complete CTest suite, physical controller, console or retail-title run is claimed. Full hosted Windows/Linux CI requires collaborator dispatch under CONTRIBUTING.md.
Checklist
mainsnapshot above; newer main merges cleanly; no duplicate fix found; prerequisite #6452 is declared unchangedNotImplemented_nid_no_patch); no silent stubs addedImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T17:29:20Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libScePad/src/PadState.cppL211, L222core/libs/prx/libSceAgcDriver/tests/execution/GpuIndirectArgumentsMisalignedWriterAhead.cppL25Some 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.
core/libs/tests/GuestPad.cppPull request closed