Skip to content

fix(libScePlayerSelectionDialog): compute param magic directly from guest pointer - #22468

Closed
SwetabhSingh17 wants to merge 1 commit into
boykopovar:mainfrom
SwetabhSingh17:fix/libScePlayerSelectionDialog-base-magic-direct-pointer
Closed

SwetabhSingh17 wants to merge 1 commit into
boykopovar:mainfrom
SwetabhSingh17:fix/libScePlayerSelectionDialog-base-magic-direct-pointer

Conversation

@SwetabhSingh17

@SwetabhSingh17 SwetabhSingh17 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What

Avoid evaluating member access &(param->base) on guest pointer parameter param in scePlayerSelectionDialogParamInitialize, computing the magic directly from reinterpret_cast<std::uintptr_t>(param) as done in scePlayerSelectionDialogOpen. Brings libScePlayerSelectionDialog to 0 direct guest pointer accesses (100% clean).

Tested

macOS, clang++ syntax check on core/libs/prx/libScePlayerSelectionDialog/Export.cpp and core/libs/tests/GuestPlayerSelectionDialog.cpp, tools/guest_pointer_audit.py libScePlayerSelectionDialog (0 direct guest pointer accesses), tools/check_conventions.py --base origin/main (passed), and tools/pr_overlap.py --branch fix/libScePlayerSelectionDialog-base-magic-direct-pointer (no overlap across all open PRs).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@ycbuzi

ycbuzi commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Tested 1d93602dcd merged into main, with the whole ctest suite on each machine below. Nothing fails that does not also fail on main on the same machine.

  • Windows Server 2022 (GitHub-hosted runner), full build, WinLibs GCC 15.2.0: 99% tests passed, 3 tests failed out of 6122; 99% tests passed, 4 tests failed out of 6122. 3 of the failing tests fail on main too. run
  • Windows Server 2025 (GitHub-hosted runner), full build, WinLibs GCC 15.2.0: 99% tests passed, 1 tests failed out of 6122; 100% tests passed, 0 tests failed out of 6122. run

AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports.

@kiwe147

kiwe147 commented Nov 21, 2026

Copy link
Copy Markdown

Tested head 1d93602dcd, applied with git apply on main fd4aeed483 together with the other 29 PRs of one batch (#17478, #21223, #24030, #24201, #14202, #18889, #19531, #21641, #21773, #22471, #23239, #23255, #23484, #23869, #23992, #24311, #18425, #21195, #21255, #22989, #23507, #23886, #14582, #17878, #19666, #19899, #20138, #21656, #21746). All applied without conflicts and the whole tree built.

Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. GPUs: NVIDIA GeForce RTX 3080 (driver 621.24) and the AMD Radeon iGPU of the CPU (gfx1036, driver 32.0.21036.18). No validation layer. iGPU run: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU="AMD Radeon", agc_/video tests only.

tests RTX 3080 iGPU
none: no test of its own in this PR - -

Whole batch: the full ctest -j 12 (6522 tests) on the RTX 3080 has 4 failing tests; the 4 that also fail on main fd4aeed483 are agc_driver_stencil_plane_memory, agc_driver_msaa_dcc_unwatch, agc_storage_write_back_host_retile, and pr_overlap_names, which needs a newer Python than my 3.10. Intermittent in this run (pass when rerun alone, or known flaky): agc_driver_store_over_untracked. The 2125 agc_/video tests on the iGPU have 2 failing: agc_driver_stencil_plane_memory, agc_driver_store_over_untracked (agc_driver_stencil_plane_memory also fails on main).

This is one combined tree, not a run of this PR alone.

AI-assisted: yes (Claude Code)

This was referenced Nov 21, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing blocks this change; the magic value now uses the guest parameter pointer, matching the validation performed by scePlayerSelectionDialogOpen.

What I ran

Reviewed head 1d93602dcd1e358c18b8614dbe640965043bb7e0. Read the description, commit list, manifest, diff, and the complete changed Export.cpp, plus include/Api.hpp and matching pointer-magic uses in related code and tests. No commands or tests were run.

Results

Check Result Note
Diff review passed One-line pointer correction
Tests not run No independent test run

Findings

Blocking

None.

Non-blocking

None.

Not verified

The author-reported macOS syntax checks, audit, convention check, and overlap check were not independently run. Other changed or excluded files: none listed in the manifest; files.json was not available through the reader.

To get this to a good state

Nothing is required.

@github-actions github-actions Bot added the already in main Merging would not change main; never closed automatically label Nov 22, 2026
@github-actions

Copy link
Copy Markdown

Merging this pull request would not change main: GitHub's test merge of it into main at 8ce96fa has the same files as that commit, and no file it touches has changed in main since, including its mode and type. Its changes look merged already, possibly through another pull request. Nothing is closed automatically. Close it if it is superseded, or push what is still missing; the already in main label goes away once merging would change main again.

@github-actions github-actions Bot added already in main Merging would not change main; never closed automatically and removed already in main Merging would not change main; never closed automatically labels Nov 22, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks for looking at this. I'm closing it because &param->base and param are the same address, so scePlayerSelectionDialogParamInitialize computes the same magic as on main and nothing a title sees changes.

If I have this wrong, or you have a title or console evidence that changes it, say so and I'll reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

already in main Merging would not change main; never closed automatically prx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants