fix(videoout): report unavailable output modes instead of throwing #709
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/709"
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 merwie on 2026-10-05T17:31:37Z.
What
sceVideoOutIsOutputSupportedthrewVIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODEfor every mode other than the default and 119.88 Hz. It now returns 1 for the default mode and 0 for any other mode.sceVideoOutConfigureOutputthrewVIDEO_OUT_ERROR_UNAVAILABLE_OUTPUT_MODEfor an unavailable 119.88 Hz mode. It now returns that error code for every unsupported mode.Flip.cppcontrols: the default mode is supported and configurable; 119.88 Hz and0xd000000aare not supported and configuring them returnsVIDEO_OUT_ERROR_UNAVAILABLE_OUTPUT_MODE.UNSUPPORTED_OUTPUT_MODEare reported as unavailable instead.Evidence from PPSA12544 (Hollow Knight: Silksong, Unity):
sceVideoOutIsOutputSupported(handle, 0xd000000a, ...)and selects a 7680-pixel output when the result is 1, 3840 otherwise.sceVideoOutConfigureOutputcaller switches on the returned code: it has cases for0x80290001,0x80290002,0x8029000b,0x80290016(SCE_VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE),0x80290019(VIDEO_OUT_ERROR_UNAVAILABLE_OUTPUT_MODE, with a hint to enable HFR inparam.jsonwhen the mode was 119.88 Hz) and0x8029001e, and continues after logging. The console returns these codes; it does not stop the title.Tested
Windows 11, WinLibs GCC 15.2.0 r7, Ryzen 7 9800X3D, Radeon RX 9070 XT.
ctest: 286/288 passed.agc_driver_lds_atomics64andagc_driver_vopc_compare_tablefail on this machine onmainas well (Vulkan device tests).video_out_flip_tests controls(not registered with ctest): passed.param.jsonparsing, the Vulkan device and the swapchain.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Output.cpp, in other functions)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-05T19:45:50Z.
Thanks. The change in
Output.cpplooks right to me. The new test lines inlibSceVideoOut/tests/Flip.cppdon't compile with GCC, though:The braced list mixes the enum with an
unsigned long long.video_out_flip_testsisEXCLUDE_FROM_ALLand not in ctest, so CI never builds it. Spelling the list type out fixes it, for examplefor (const uint64_t unsupported : std::initializer_list<uint64_t>{VIDEO_OUT_OUTPUT_MODE_119_88HZ, 0xd000000aull}). #647 has since landed and added a line in the same place inTechnicalDebt.md(after thesceAvPlayerAddSourceentry), so this also needs a one-line rebase keeping both lines.Imported from boykopovar/AnyPS5. Originally posted by merwie on 2026-10-05T20:49:05Z.
Thanks for catching that. Fixed and rebased:
std::initializer_list<uint64_t>{VIDEO_OUT_OUTPUT_MODE_119_88HZ, 0xd000000aull}(with<initializer_list>included). WinLibs GCC 15.2 had accepted the mixed list, so I did not see it locally.mainafter #647;TechnicalDebt.mdkeeps both lines (#647's STRICT_COLORIMETRY entry, then this one).Retested on the rebased branch:
video_out_flip_tests controlspasses,ctest315/317 (the twoagc_driverVulkan tests that fail on this machine onmaintoo).Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-05T23:37:41Z.
This needs a one-line rebase now that #648 has landed:
docs/dev/TechnicalDebt.mdconflicts with currentmain, where #648 added thesceVideoOutRegisterBuffers2(DCC buffers) line at the same place as yoursceVideoOutIsOutputSupportedline. Keeping both lines (#648's first, then yours) resolves it; nothing else conflicts, and the code merges cleanly with #648'sFlip.cppchanges.Imported from boykopovar/AnyPS5. Originally posted by merwie on 2026-10-06T07:59:48Z.
Merged
main(a merge, not a rebase, so the review history stays) and kept bothTechnicalDebt.mdlines in the order you suggested. Nothing else changed.