Skip to content

feat(videoout): expose buffer labels and release replaced frames - #5592

Merged
adriadam10 merged 7 commits into
boykopovar:mainfrom
JJenkx:feat/videoout-buffer-labels
Oct 14, 2026
Merged

adriadam10 merged 7 commits into
boykopovar:mainfrom
JJenkx:feat/videoout-buffer-labels

Conversation

@JJenkx

@JJenkx JJenkx commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

What

Implement sceVideoOutGetBufferLabelAddress with a port-owned array of 16 aligned 64-bit labels. Return its address and count, reset newly registered slots, and release the previous displayed buffer's label when its replacement completes presentation. Black/blank replacements release the previous buffer without using a negative index. Ports and reopened generations have separate arrays.

Route stores through a graphics-driver helper retained by production NID patching, so the memory tracker observes an atomic release store. Failed handle/pointer queries preserve output, and successful pointer output supports unaligned storage.

Astro Bot PPSA21564's bundled driver uses a pointer output and base + index * 8. Count and release behavior follow shadPS4 and its driver. PS5 timing, error policy, repeated same-buffer flips and concurrent guest stores remain unverified and documented in library debt. This does not implement EOP-flip tokens, which are separate work in #5539.

Tested

Checklist

  • Based on main; merges cleanly with current main, with validation revisions recorded above
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • No silent stubs added
  • No notes, investigation files or images added to the repository
  • No new third-party code
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: PPSA21564 Astro Bot (PPSA21564) #357 (buffer-label import and host presentation behavior)
  • GPUs tested: AMD Radeon RX 6650 XT / RADV Mesa 26.2.4 and software lavapipe / Mesa 26.2.4, Arch Linux; native validation scope above
  • AI-assisted: yes

@github-actions

Copy link
Copy Markdown

Progress report (ce5c839 → d1de55f)

📈 System libraries: 88.19% (+0.01%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceVideoOut sceVideoOutGetBufferLabelAddress

@adriadam10 adriadam10 self-assigned this Oct 14, 2026
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the label array against shadPS4 and fpPS4 (null output, invalid handle, count 16), the registration reset and the release of the previous buffer on replacement/black/blank flips. Built and ran video_out_flip_labels and video_out_flip_labels_main on a real X display (both pass; they skip under the offscreen CI driver). Removing the release in processFlip makes the test fail, restoring it passes. Merging once the full Build is green.

@adriadam10
adriadam10 merged commit 8bbed13 into boykopovar:main Oct 14, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants