Repository navigation
feat(libSceVideoOut): allow ANYPS5_OUTPUT_4K override in outputStatus - #7879
ErenYeager1836 wants to merge 1 commit into
Conversation
NHL 27 (PPSA34063, issue boykopovar#7635) queries sceVideoOutGetOutputStatus on a freshly opened handle before registering any buffers. The default port dimensions report 1080p (resolution = 1), selecting profile PS5_BASE which returns null and crashes at rip 0x79289c6 reading [rax+0x74]. Allow forcing 4K resolution status (resolution = 2) via the ANYPS5_OUTPUT_4K environment variable, document it in docs/dev/ENVIRONMENT.md and docs/dev/debt/libSceVideoOut.md, avoiding the null profile dereference.
|
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.
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 the implementation and documentation in PR #7879:
- Logic: Setting
force4kbased onstd::getenv("ANYPS5_OUTPUT_4K") != nullptrincore/libs/prx/libSceVideoOut/src/Output.cppallows overridingstatus.resolutionto 2 (4K) for titles that query resolution before registering buffers. - Environment & Debt Docs: Row added to
docs/dev/ENVIRONMENT.mdand functional debt documented underdocs/dev/debt/libSceVideoOut.md. - Conventions: No code comments introduced.
The CI conventions workflow is failing because the PR description does not include the required template sections from .github/pull_request_template.md. Updating the PR body with ### Tested and ### Checklist will clear the failure:
### What
NHL 27 (PPSA34063, 01.003.001, issue #7635) queries `sceVideoOutGetOutputStatus` right after `sceVideoOutOpen`, before registering any buffers. The port defaults to 1920x1080, causing `outputStatus` to report `resolution = 1` (1080p). The title then selects profile `PS5_BASE`, for which it has no entry, returning null and crashing:
```text
FATAL: unhandled exception 0xc0000005 on thread 4836 'Job6'
rip 0x00000001479289c6 PPSA34063-app0.exe+0x79289c6
read of 0x0000000000000074
rax 0000000000000000With ANYPS5_OUTPUT_4K=1 the title selects PS5_4K, does not crash, and displays pictures.
This change:
- Allows forcing 4K resolution status (
status.resolution = 2) viaANYPS5_OUTPUT_4Kenvironment variable incore/libs/prx/libSceVideoOut/src/Output.cpp. - Documents
ANYPS5_OUTPUT_4Kindocs/dev/ENVIRONMENT.mdanddocs/dev/debt/libSceVideoOut.md.
Fixes #7635.
Tested
Windows 11, MinGW-w64 GCC 15.2.0 (Release). Verified on NHL 27 (PPSA34063).
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
- Unimplemented paths throw (
NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file - No notes, investigation
.mdfiles 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: #7635
- Unblocks: PPSA34063 #7635
- GPUs tested: n/a
- AI-assisted: no
*(If AI assistance was used, adjust `AI-assisted` to `yes`)*.
|
Thanks for the verification @fogydes! Updated the PR description with the required |
|
Closing in favour of #7814, which fixes the same thing at the root.
If #7814 does not cover your 1080p-display case once merged, please open a new PR with the evidence for what is still wrong. Welcome to reopen with this addressed. |
What
Allows running titles that expect 4K output buffers on displays below 4K by setting
ANYPS5_OUTPUT_4K=1.PPSA34063 (NHL 27, #7635) allocates output buffers for 3840x2160. On a 1080p host monitor,
sceVideoOutGetOutputStatusinfersresolutionas 1 (<= 1080p), causing the title's rendering job pipeline (Job6) to encounter a null buffer dereference at startup. SettingANYPS5_OUTPUT_4K=1forcesstatus.resolutionto 2 (SCE_VIDEO_OUT_RESOLUTION_3840X2160), allowing the title's 4K render path to proceed.Documents
ANYPS5_OUTPUT_4Kindocs/dev/ENVIRONMENT.mdand notes the override behavior indocs/dev/debt/libSceVideoOut.md.Tested
PPSA34063crash log whereoutputStatusreporting resolution 1 causes null buffer pointer dereference on threadJob6.python tools/check_conventions.pypasses.python tools/env_reference.pypasses with the new environment entry.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