Repository navigation
fix(libSceVideoOut): answer the flip-master calls as measured on a PS5 - #11853
adriadam10 merged 2 commits into
Conversation
|
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
The measured results and the paired Vulkan validation runs are useful, and I verified the implementation follows the measured fresh-handle cases. One blocking scope issue remains: the only console measurements are for a newly opened handle with no buffers registered, but sceVideoOutClearFlipMaster returns 0x8029001C for every open handle, and sceVideoOutSetFlipMaster returns the measured invalid-handle code for every open handle with master 0 or 1. The debt entry explicitly says behavior with registered buffers is unmeasured. The project rule says unknown general behavior must not be guessed. Please either add console evidence for the registered-buffer state or make that unmeasured state throw and record it as such, with a regression test for the boundary. Current main is the tested base and the touched paths have not changed since; I did not independently run the Windows/Vulkan suite.
d3a2a7e to
7af0c1d
Compare
|
@MarcZX10 I limited the measured codes to the measured state.
|
Dismissing a stale review: the requested changes were addressed after it (new head) and the merge queue blocks on it. Please request changes again if anything is still open.
MarcZX10
left a comment
There was a problem hiding this comment.
Re-reviewed — approved
The author now limits the measured return values to fresh handles and keeps unmeasured buffer-registered states on the explicit not-implemented path.
What I checked
- Reviewed exact head
7af0c1dc60d0b1b1324349870df030323feb0848against livemain10bec5c322eb581b3e959e6c7e18bcf09e068e96. SetFlipMasterreturns the measured invalid-handle code for invalid handles and for a fresh handle with master 0 or 1; other master values throw.ClearFlipMasterreturns the measured0x8029001Conly for a fresh handle; invalid handles return the measured invalid-handle code.buffersEverRegisteredis set after registration validation under the config mutex and is not cleared when buffers are unregistered. Both functions check that state under the same mutex, so the formerly unmeasured registered-then-unregistered state continues to throw.- The debt entry now identifies the signature and behavior gaps as unverified. Current-main merge preview is clean; conventions and diff check pass.
Results
| Check | Result |
|---|---|
| Current-main merge preview | Clean (d18747d5b6bc83757d0a7b5d24d704e191a2e487) |
| Diff check | Pass; no output |
| Conventions | Pass |
| Focused Windows tests | Author reports 17 video_out_flip_* tests passed twice on Windows 11/GCC 15.2 on the PR's stated base |
| Negative control | Author reports the old main implementation fails the fresh-handle assertion; the previous broad-return revision fails the new post-registration throw assertions |
| Vulkan validation | Author reports the previous functional revision passed on main and the change with no VUIDs; the follow-up is stated not to touch GPU state |
| Hosted checks | Windows, conventions, labels, eligibility, and report pass; Linux and specialized product jobs skipped |
Raw local output
merge-base: 62b3ba2522b38543b50cbc4b7093c9ab8fdfb5df
merge-tree: d18747d5b6bc83757d0a7b5d24d704e191a2e487
All conventions checks passed.
git diff --check: no output (pass)
Negative control
The author reports both the baseline failure and the boundary regression against the previous revision. I did not independently run either control.
Findings
Blocking
None found in the measured fresh-handle cases or the explicit unknown-state paths.
Non-blocking
The focused runtime and Vulkan results are author-reported and predate the current live main refresh. I did not run CTest locally. The one-argument call shape and behavior after buffer registration remain explicitly unverified and are recorded as debt; the implementation does not claim those cases are supported.
Sources
- Flip-master implementation at reviewed head
- Registration state at reviewed head
- Boundary tests at reviewed head
- Debt entry at reviewed head
- Live main
Not verified
I did not run CTest, Vulkan validation, Linux, a title, or console behavior locally. The test reports and PS5 measurements come from the author. The test runs were on the stated earlier base, not on live main.
To get this to a good state
No further change is required for the measured fresh-handle behavior. Keep the unmeasured signature and registered-buffer behavior documented until console evidence is available.
|
@ionut27001 The fresh-handle restriction now keeps unmeasured buffer states on the production refusal path. Please remove the four new expectFailure assertions in Flip.cpp:1081-1082 and :1084-1085 that require registered/previously registered handles to throw not implemented. Those are unsupported valid states, so the tests must not pin the current refusal. Keep the production guard/throw, measured fresh and invalid-handle checks, and remove any setup that becomes unused. Then rerun video_out_flip_fresh and the affected registration/reopen tests. @adriadam10 Keeping you in the loop as the assigned maintainer; this is a draft review request, with coordination still with your lane. |
MarcZX10
left a comment
There was a problem hiding this comment.
Re-reviewed exact head 7af0c1dc60d0b1b1324349870df030323feb0848. The production guard still correctly leaves buffer-registered states unimplemented, but the four new expectFailure assertions in Flip.cpp pin valid registered and previously-registered handle states to throwing. Please remove those assertions and any setup used only by them, retaining the production guard and measured fresh-handle/invalid-handle coverage; rerun the focused video_out_flip* tests on the resulting head. The current-main merge preview is clean; diff check and conventions pass. I did not run the GPU tests locally.
|
Checked the diff against the measured values in the debt entry and #8927: both calls answer only the measured fresh-handle state ( |
What
sceVideoOutSetFlipMasterandsceVideoOutClearFlipMasterwereNotImplemented_nid_no_patchstubs inUnimplemented.cpp, so every call aborted the guest, including the calls whose console answers are already recorded in the debt entry.The evidence is the existing debt entry and the description of #8927 (#8927): measured in a payload process on a PS5 (firmware 12.70) on a handle from
sceVideoOutOpen(0xff, 0, 0, NULL)with no buffer registered,SetFlipMasterwith (handle), (handle, 0) and (handle, 1) returned0x8029000B,ClearFlipMaster(handle)returned0x8029001C, and both returned0x8029000Bfor handle -1. I have no raw log of that run beyond those two texts. #8927 measured these values but left both stubs inUnimplemented.cpp; its description noted that flip-master assertions could go intests/Flip.cpp.This change moves both into
src/Output.cpp:SetFlipMasterreturns0x8029000Bfor a handle that is not open, and for an open handle that has never had buffers registered with master handle 0 or 1. Any other master handle still throws, since a real master handle was not measured.ClearFlipMasterreturns0x8029000Bfor a handle that is not open and0x8029001Cfor an open handle that has never had buffers registered. The name of0x8029001Cis not known; the constant is named by its value.VideoOutConfiggets abuffersEverRegisteredflag, set when a buffer group is registered and never cleared.Still open, recorded in the debt entry: what flip-master ownership means, the signatures
sceVideoOutSetFlipMaster(handle, masterHandle)andsceVideoOutClearFlipMaster(handle)(taken from the declarations, unverified), a handle that has had buffers registered, a closed handle (answered like -1), and a real master handle. PPSA29866 imports both functions; I have not confirmed that it calls them.Overlaps: an open-PR search for
SetFlipMaster,ClearFlipMaster,flip masterandflip-masterfinds only #11709 (docs-only, mine), a rewrite of the same debt line to state the signatures. This PR supersedes #11709: it keeps the same signature wording and also implements the measured codes, and #11709 will be closed if this one is opened. #6447, which made both stubs return success, is closed. No open PR changes the behaviour of either function.Tested
Windows 11, WinLibs GCC 15.2.0, on
mainat 62b3ba2 (rebased; the 17video_out_flip_*tests rerun there):video_out_flip_*tests pass, twice.video_out_flip_freshnow checks (handle, 0) and (handle, 1) and (-1, 0) forSetFlipMasterand handle and -1 forClearFlipMasteron a fresh handle, and that both throw after a buffer is registered on that handle and again after it is unregistered. The one-argument (handle) shape cannot be written against the two-argument declaration and is not tested.Output.cppandUnimplemented.cppfrommain,video_out_flip_freshfails, becauseSetFlipMasterthrows. WithOutput.cppfrom the previous revision of this PR (measured codes for every open handle),video_out_flip_freshfails, because the handle with a registered buffer is answered instead of throwing.video_out_flip_*tests onmainand on this change, withctest -V,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1andANYPS5_REQUIRE_VULKAN=1(layer from Vulkan SDK 1.4.363.0 viaVK_ADD_LAYER_PATH). All pass on both. 16 of the 17 tests create a Vulkan device; in each, the loader log (VK_LOADER_DEBUG=layer) shows the validation layer inserted. Neither log containswas not found but was requested by env var VK_INSTANCE_LAYERSor anyVUID-message. The two calls this PR changes touch no GPU state.Not tested on Linux, nor with a title.
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)