Skip to content

feat(videoout): present reserved flips from tagged GPU completion - #40

Merged
JJenkx merged 102 commits into
mainfrom
feat/videoout-eop-flips
Oct 14, 2026
Merged

JJenkx merged 102 commits into
mainfrom
feat/videoout-eop-flips

Conversation

@JJenkx

@JJenkx JJenkx commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

What

Reserve an EOP flip and return an opaque DWORD token; a matching live reservation in a graphics-queue RELEASE_MEM packet drives presentation. Preserve label writes and normal queue events. Closing cancels unsubmitted reservations; tokens are unique across port generations.

The packet matcher now requires type 3, exactly eight words and a complete body before reading INT_SEL or INT_CTXID. Ordinary context IDs, including consumed/cancelled token values, remain ordinary label writes. A pre-scan avoids taking the driver mutex when no flip candidate is present. EOP label preparation/execution holds the device-replacement shared lock, then releases it before presentation as required by the existing flip path. Repeated live tokens within one submission are still rejected.

Also handle the trace-user-data WRITE_DATA emitted before this flip by updating UCONFIG state. Thread-trace capture and async-queue EOP flips remain unsupported.

The five-argument ABI and DWORD token use are inferred from Astro Bot PPSA21564's bundled AGC driver and the earlier isolated original-routine ABI probe. No title stop on current main, standalone application startup or measured console token encoding/copy width/capacity/error policy is established. These limits remain documented in technical debt.

Tested

Standalone head 09f73c4af643a32834d340adbba2759657d6b0ab includes upstream main a5f493f90dca348a65561aed4bb325a629d1b668. The bundled Linux Release library/test build passes. Direct X11 eop, eop_main and eop_aftergpu pass on both AMD Radeon RX 6650 XT/RADV Mesa 26.2.4 and lavapipe Mesa 26.2.4, without skips. Coverage includes a type-2 filler carrying RELEASE_MEM opcode bits, malformed lengths, live-token duplicates, ordinary label writes with consumed/cancelled context IDs, close/reopen generations, capacity/concurrent callers and GPU work before presentation.

Restoring only the former numeric token-range refusal makes the updated regression fail with EOP flip token is no longer reserved. Restoring the source byte for byte, rebuilding and rerunning passes. The default offscreen CTest invocation skips all three display cases; those skips are not validation.

Current conventions and whitespace checks pass. Fresh full Linux/Windows CI passes for this published head; expected skips remain unvalidated. Earlier CI and original-routine probe results refer to their prior revisions; no current Windows, full-suite, game-performance or console validation is claimed.

Checklist

  • AI-assisted: yes.
  • Depends on: none.
  • Unblocks: none.
  • GPUs tested: AMD Radeon RX 6650 XT/RADV Mesa 26.2.4 and lavapipe Mesa 26.2.4 on Arch Linux.
  • Known limitations recorded in technical debt.
  • No proprietary assets or private diagnostic artifacts committed.

Verified current full CI: run 38505683103 passes topic 09f73c4af643a32834d340adbba2759657d6b0ab merged into base a5f493f90dca348a65561aed4bb325a629d1b668. Linux 1059 passed/49 expected skips; Windows 730 passed/400 expected skips. Skipped cases remain unvalidated. The tested source tree matches this published topic head.

gjonn and others added 2 commits October 12, 2026 18:05
The pixel entry prologue filled only the center and centroid pairs, so a
shader interpolating through a sample pair read I = J = 0 and every
attribute came out as its P0. Give the sample pairs their SPI_PS_INPUT_ADDR
VGPRs, fill them with the barycentrics of their kind, and classify
attributes read through LINEAR_SAMPLE as NoPerspective for host
interpolation.
…bel satisfies

waitMemory starts a new collect epoch when it returns, so the next
CollectWrites of every surface walks the write watch again. The label-table
path already keeps the epoch for a non-late hit whose store came from the
waiting queue: such a label orders only that queue's own work, no store by the
guest or another queue. The two storedSince returns (at entry and while
polling) answer the same question from the label-store history but kept the
bump for a store of the waiting queue. They now keep the epoch in that case too.
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Progress report (a0b44ca → 8c0c449)

📈 System libraries: 88.34% (+0.01%, +2 implemented, +1 declared functions)

✅ 2 implemented
Library Name
libSceSsl sceSslLoadCert
libSceVideoOut sceVideoOutSubmitEopFlip
🆕 1 declared as stubs
Library Name
libSceCesCs sceCesRefersUcsProfileCp1250

LeandroLP23 and others added 5 commits October 13, 2026 11:25
The chart repeated the percentages the badges and the progress map
already show. Because declaring and implementing functions usually
land together, the library line stayed near flat while the project
grew. It now plots implemented and declared library functions and
decoded shader instructions as counts; the tooltips keep the
percentage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…helper lanes

On a 32-lane host, a wave64 pixel program's v_readlane_b32 of lane 63 is emitted only when its half-wave scan's keys are proven zero for lanes that did not enter. The proof walk accepted the not-helper test (IEqual32 of HelperInvocation and 0) only inside ballots, not as a lane bit, and it searched conjunctions depth first: a key mask like exec & ~vcc inside a loop spent the 512-step budget on the loop's exec phis before it reached the helper test. Accept the helper test as a lane bit, and look for a false or helper conjunct before walking an operand. Resident Evil Village's wave-wide OR reductions (DPP row shifts, v_permlanex16, v_readlane of lanes 31 and 63) failed this way.
The proof that a half-wave scan's keys are zero for lanes that did not
enter walks a conjunction depth first under a 512-step budget. Narrowing
exec with 600 compares before the scan puts the helper-lane test at the
bottom of a 600-deep LogicalAnd chain in the keys: walking the first
operand first spends the whole budget before reaching it, and the
v_readlane_b32 of lane 63 is refused. Looking for a false or helper
conjunct before walking an operand finds it, so lane 31 becomes a
subgroup OR on a 32-lane host. Resident Evil Village's wave64 pixel
programs key these scans by a loop's exec ahead of the helper test.
…ble imports

A build mapping only the cached address space but writing through V#s got a
table keyed by its writes: a new key for nearly every set of written
addresses, so each such build merged the space's imported ranges, stored them,
then hashed and compared them in BdaResources.

AddressRanges splits only ranges without write permission around the written
intervals. When no written interval overlaps such a range of the space, its
result is the space's own ranges, so the build binds the space's table by the
space serial, as a build without writes does. A write overlapping a range
without write permission keeps the per-writes table.

Test: builds with one and two writes inside a writable import bind the serial
and the ranges of the build without writes, equal to AddressRanges(), and keep
the read-only import without write permission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 13, 2026
Dripl1x and others added 6 commits October 13, 2026 20:39
…e misses

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dead Cells (PPSA15552) calls sceNgs2VoiceGetState on custom sampler
voices with a 48-byte buffer and reads the 64-bit value at offset 16 as
a running counter. Fill it with the decoded sample count, keep the
common state flags, and return INVALID_OUT_SIZE for other sizes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added agc libSceAgc* prx Other PRX libraries build CMake, submodules, 3rdparty docs Documentation labels Oct 13, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 13, 2026
@JJenkx JJenkx added the next-20 Selected next merge candidates; see each PR for current validation label Oct 13, 2026
milescoviello and others added 4 commits October 13, 2026 23:28
TryMakeTableImage planned a T# read from a bindless image table only when
its eight scalar reads had no user other than that one GetImageResource.
Descriptor-phi splitting gives each image operation its own copy of the
T# over the same reads, so a table entry that is both queried and sampled
was refused, and GetHandle then rejected the scalar reads.

Accept reads whose every user is a GetImageResource built from exactly
those eight reads; each copy is planned as the same table.

Crimson Desert (PPSA25286) stops on such a shader at start-up:
image_get_resinfo and image_sample_lz on one s_buffer_load_dwordx8 T#.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ISSES is set

The per-miss component comparison allocates and walks the whole key, and
it ran under APS5_PROFILE_DRAW as well, where it cost queue time on every
resource-content miss. It now runs only with the trace variable, which is
also the only one that prints its [keymiss] lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A 2D-array image_load or image_store bound to a 3D T# addresses the slice as z. Add a 3D runtime mode for these accesses and drop loads and stores whose slice is past the volume depth.
@github-actions github-actions Bot added the libkernel libkernel label Oct 14, 2026
The zero fill kernel (v_mov_b32 v1, 0; buffer_store_format_x) is also emitted with other inline
integer constants as its source. Run as compute dispatches, those writes are pending writes of
unknown value, so a later read of DCC keys over their range waits for the dispatch. A constant of
0 to 64 or -1 to -16 is now matched like the zero fill and stored as a buffer fill of that value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adriadam10 and others added 25 commits October 14, 2026 13:56
…xed-base

feat(relinker): load Linux executables at a fixed base
…y-capacity

perf(agc): reserve resource keys for their serialized payload
…ser-data-tail

feat(shader): link raw vertex prologs through user-data tails
…te-snapshots

perf(agc): extend pending write snapshots incrementally
…-epoch

perf(agc): start no collect epoch at a wait its own queue's stored label satisfies
…jacent-bda-loads

perf(shader): read adjacent BDA dword loads of one block through one span read
…ant-compute

feat(recompiler): reuse pure IR values recomputed in dominated blocks
…re-replay

feat(agc): capture submissions and replay their decode and wait releases offline
…tes-space-table

perf(agc): bind the address space's BDA table for writes inside writable imports
…tory-counts

feat(tools): plot counts in the progress history chart
feat(agc): trace slices and GPU ranges carry the recorder batch they belong to
…terfall-descriptors

feat(recompiler): plan waterfall loops over per-lane T#s as non-uniform tables
…ed-scans

perf(relinker): stream scans and reuse executable buffers
feat(tools): report whether a branch is in step with main
perf(agc): bind a sparse descriptor heap's committed run in place from its import
…rd-fill

perf(agc): take a dword fill of any inline constant as a buffer fill
…rt-all-unresolved-imports

feat(relinker): report every unresolved ELF import before failing on Windows
…s-trace

feat(agc): count which key component differs on resource-content cache misses
…ovider-audit-20261013

feat(tools): fail import audits on strict provider mismatches
…symbol-option

feat(tools): add --name option to nid_names to compute symbol NIDs
…r-secondary-lod-bias

feat(libSceAgcDriver): support secondary LOD bias and relax unnormalized coordinate filters
…-at-label

feat(agc): store pending storage-image results before each GPU label with APS5_STORE_AT_LABEL
…-sampler-state

feat(ngs2): report custom sampler voice state
…e-cp1250

feat(libSceCesCs): declare sceCesRefersUcsProfileCp1250
Rebased onto main as one commit (conflicts in debt notes, Presentation.cpp includes and Submission.cpp helpers).
@adriadam10
adriadam10 force-pushed the feat/videoout-eop-flips branch from 09f73c4 to 8c0c449 Compare October 14, 2026 12:33
@github-actions github-actions Bot added ci .github shader core/shader relinker core/relinker labels Oct 14, 2026
@JJenkx
JJenkx merged commit 937cd6c into main Oct 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build CMake, submodules, 3rdparty ci .github docs Documentation libkernel libkernel next-20 Selected next merge candidates; see each PR for current validation prx Other PRX libraries relinker core/relinker shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.