fix(libSceVideoOut): refuse the output status with VRR for a handle without buffers #17812
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17812"
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 xXPBSXx on 2026-11-09T16:56:13Z.
What
sceVideoOutGetOutputStatusWithVrrfilled the 80-byte status for a handle that has no buffer registered. A PS5 returns0x8029001Cand writes nothing for it. It now does the same, with the checksceVideoOutClearFlipMasteralready uses. The tests pin the refusal on a fresh handle and that the call succeeds once a buffer is registered. The debt entry forsceVideoOutGetOutputStatusWithVrr(docs/dev/debt/libSceVideoOut.md) said the console's0x8029001Ccheck "tests states that are not modelled and are never reported"; the entry now states the measured result for a fresh handle and keeps the0x8029001Bobject-field check as not modelled. Titles are not affected as far as measured: the title measurement (firmware 13.40) called it after its buffers were registered; no title is known to call it on a fresh handle.Tested
Measured on a PS5 with firmware 11.60 (
kernel_get_fw_version0x11600005), from a homebrew payload process (ps5-payload-sdk v0.45, elfldr), on 2026-11-09 at 08:24 UTC; the console's own clock read about 1 h 41 min more (see the first comment). A title process may differ.sceVideoOutOpen(0xff, 0, 0, NULL)with no buffer registeredmainbeforesceVideoOutGetOutputStatusWithVrr(handle, &status)return0x8029001C0x8029001CstatuswrittenOn Windows 10 Pro with MinGW GCC (WinLibs), a Release build,
ANYPS5_REQUIRE_VULKAN=1and a shader cache off, onmain67092e70b5the test commit alone failsvideo_out_flip_resolution_override,guest_video_out_resolution_statusandguest_video_out_hdr(3 of 3), and with the fix commit on the samemainall three pass.tools/check_conventions.py --base upstream/mainpasses. The runs used no Vulkan validation layer, because the added check returns before any Vulkan call.Overlap: the 24 other open pull requests that change
docs/dev/debt/libSceVideoOut.md,Output.cpp,Flip.cpp,GuestVideoOutHdr.cpporGuestVideoOutResolutionStatus.cpp(listed by update time) were checked on 2026-11-09 between 16:30 UTC and 16:38 UTC againstmainf6ed718e10. Four already conflict withmainwithout this change (#4040 and #14212 in the debt file, #12315 and #5021 in other files). #16463 (a documentation sync of 39 files, a different author) conflicts inGuestVideoOutHdr.cpponly with this change, because both touch that test file; whichever merges second needs a small rebase. The other nineteen merge cleanly with and without it, among them #17696, #17763, #16584 and #14106, which edit other entries of the debt file.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
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-11-09T17:10:10Z.
Review: APPROVED
Read
cee35fd34cagainstmain.isFreshHandle(Output.cpp:304) is!cfg->buffersEverRegisteredunder the config mutex, the same testsceVideoOutClearFlipMasteruses (:321) for the same0x8029001C. It takes and releases the lock beforesceVideoOutGetOutputStatusWithVrrtakes it again, so there's no nested locking.INVALID_ADDRESS) and handle checks still come first. A fresh handle returns before the status is filled, which gives the measured "0 bytes written".buffersEverRegisteredstays set. That case wasn't in the measurement, so keepingmain's answer for it is right.AI-assisted: yes (Claude Code)