Skip to content

fix(pad): capture touch contact IDs with input samples - #6485

Closed
Ondra97 wants to merge 2 commits into
boykopovar:mainfrom
Ondra97:codex/team-20261015-worker-3
Closed

Ondra97 wants to merge 2 commits into
boykopovar:mainfrom
Ondra97:codex/team-20261015-worker-3

Conversation

@Ondra97

@Ondra97 Ondra97 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

What

I reproduced touch contact IDs changing when a title drains older scePadRead samples 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 4fe92c9c23c7bd861d63664d4efde3033b6226f6 from #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.

  • Windows: Windows 11 Pro 10.0.26300, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja Release, BUILD_TESTING=ON. AMD Ryzen 9 7900X, 32 GB RAM, NVIDIA GeForce RTX 4070 Ti SUPER. Full default application build including patched libraries passed with 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.
  • Windows GPU prerequisite check: agc_driver_gpu_indirect_arguments_misaligned_writer_ahead passed 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=1 and ANYPS5_NO_SHADER_CACHE=1; the log confirms the selected physical device. One executed test, no skip. This checks the inherited fixture from test(agc): align the indirect arguments block at run time #6452, not a rendering-performance or game result.
  • Linux: Ubuntu 24.04.5 LTS x86-64, GCC 13.3.0, CMake 3.28.3, Ninja Release, isolated VirtualBox source/build with 8 GB guest RAM. Full-runtime configuration; only the listed CPU targets and their native runtime dependencies were built. All 4/4 tests passed without skips: 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 ID on Windows main f633042dfdf0d51f4af58fafbade3fa9d47fd169 and Linux main 92e50418f33b8950ceea950cb37331a941f5be0e; applying the production correction passed. The Pad source and regression are unchanged by the rebases. On the final committed Linux head, guest_pad also passed three consecutive repetitions.

Registered Linux touch-history regression main 92e50418 this fix
Failed guest_pad tests 1 0

I 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 68c8a853 with #6337 at 279fee87a077f413daa950deb73c2940232f0a3b passed 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 both now and touchIds; 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

@github-actions

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6337 core/libs/prx/libScePad/src/PadState.cpp L211, L222
PR 6478 core/libs/prx/libSceAgcDriver/tests/execution/GpuIndirectArgumentsMisalignedWriterAhead.cpp L25

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.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestPad.cpp

@Ondra97 Ondra97 closed this Oct 15, 2026
@Ondra97
Ondra97 deleted the codex/team-20261015-worker-3 branch October 15, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants