Commit Graph

1128 Commits

Author SHA1 Message Date
Dean Galvin a3ffb73309 perf(agc): deliver end-of-pipe interrupts after their work without draining
A RELEASE_MEM with an interrupt select drained the device: the queue
worker submitted everything recorded and waited for the GPU before it
stored the label and delivered the interrupt. PPSA21564 issues about 300
of them per frame, so the worker and the GPU took turns.

The label is now recorded like any other (on the GPU behind the work, or
as a completion action behind pending write-backs), and the delivery
becomes a completion action of the batch holding the work before the
packet (Recorder::AfterRecordedWork, after the batch's earlier
completions). It is counted with the completion labels, so idle workers
and pollers reap it, and it starts the label flush deadline. With draws
or dispatches recorded since the last submit the batch is submitted at
once. A batch holding only label stores stays open and goes out with the
next work, at the label flush deadline, at a wait, at a flip or at the
end of the submission, like any other pending label. A label the GPU
cannot store, or one that does not decode, still drains.

The interrupt so never arrives before the work ahead of it completed and
its label landed; it can only arrive later, by at most the flush
deadline plus the work recorded into the same batch.
2026-10-03 09:56:05 +13:00
boykopovar 7d40a57d18
Merge pull request #308 from asimplestray/feat/shader-vop3-mad
feat(shader): implement legacy float multiply-add ops
2026-10-02 23:29:05 +03:00
boykopovar 5540d1953b
Merge pull request #384 from DotDebian/feat/vop3-lerp-u8
feat(shader): implement v_lerp_u8
2026-10-02 23:28:28 +03:00
boykopovar b68c8c27f1
Merge pull request #379 from DotDebian/feat/shader-vop3-sad
feat(shader): implement v_sad_u8, v_sad_hi_u8, v_sad_u16 and v_msad_u8
2026-10-02 23:28:10 +03:00
boykopovar 95f4503aab
Merge pull request #358 from Pouare514/feat/cyberpunk2077-loading
feat(libs): Cyberpunk 2077 loading support (REDGalaxy + stubs)
2026-10-02 23:26:45 +03:00
Pouare514 1c724c0228 feat(libs): Cyberpunk 2077 loading support (REDGalaxy + stubs)
# Conflicts:
#	core/libs/prx/libSceContentExport/Export.cpp
#	core/libs/prx/libScePlayGoDialog/Export.cpp
2026-10-02 23:14:04 +03:00
boykopovar 8ff209a865
Merge pull request #300 from Pouare514/feat/libScePlayGoDialog
feat(libScePlayGoDialog): add PlayGo install dialog
2026-10-02 23:08:55 +03:00
boykopovar d098840dbc
Merge pull request #307 from oneandonlydean/feat/avplayer-ffmpeg
feat(avplayer): decode H.264 and AAC with FFmpeg
2026-10-02 23:07:49 +03:00
boykopovar b45d521224
Merge pull request #287 from SP4C3B4R-8/feat/pad-tilt-correction
feat(libScePad): implement scePadSetTiltCorrectionState
2026-10-02 23:02:26 +03:00
boykopovar 48752c1132
Merge pull request #280 from arreina/pr/rdna-truncated-modifier
fix(shader): reject SDWA and DPP instructions without their modifier word
2026-10-02 22:45:32 +03:00
boykopovar 82bd115159
Merge pull request #275 from oneandonlydean/fix/recompiler-exit-tail-merge
fix(recompiler): give a loop's exit-tail branch a selection merge
2026-10-02 22:44:47 +03:00
boykopovar 5026351b3f
Merge pull request #274 from RomainROCH/codex/fix-directory-buffer-errors
fix(libkernel): report undersized Windows directory buffers
2026-10-02 22:39:37 +03:00
boykopovar 4181fbd521
Merge pull request #279 from Pouare514/fix/dreaming-sarah-boot
fix(libkernel): boot Dreaming Sarah past unwind and debug raise
2026-10-02 22:38:49 +03:00
boykopovar 7831d57aed
Merge pull request #277 from oneandonlydean/perf/agc-draw-input-reuse
perf(agc): reuse a draw's index and vertex copies while the guest bytes are unchanged
2026-10-02 22:33:32 +03:00
boykopovar f9e0b8ba69
Merge pull request #276 from oneandonlydean/perf/agc-draw-snapshot-reuse
perf(agc): reuse unchanged draw input snapshots across draws
2026-10-02 22:33:18 +03:00
boykopovar 55cea557ee
Merge pull request #273 from RomainROCH/codex/fix-save-memory-growth
fix(savedata): preserve memory saves when growth reads fail
2026-10-02 22:32:56 +03:00
boykopovar 11814ad660
Merge pull request #349 from DotDebian/feat/sync-on-address
feat(libkernel): implement sceKernelSyncOnAddressWait and sceKernelSyncOnAddressWake
2026-10-02 22:31:45 +03:00
boykopovar 27edcac156
Merge pull request #261 from MichonGoddijn231849/fix/rect-list-per-vertex-parameters
fix(shader): rect lists take explicitly interpolated fragment parameters and refuse only custom ones
2026-10-02 22:23:14 +03:00
boykopovar 4503ec54af
Merge pull request #260 from adriadam10/fix/vop3-compare-neg
fix(shader): accept neg on VOP3-encoded float compares
2026-10-02 22:22:18 +03:00
boykopovar 2af9dda269
Merge pull request #255 from adriadam10/feat/scalar-bit-count-ops
feat(shader): implement s_bcnt0_i32_b64, s_ff0_i32_b64, s_flbit_i32(_i64), s_quadmask_b32
2026-10-02 22:21:49 +03:00
boykopovar d399b4e04c
Merge pull request #245 from RomainROCH/codex/fix-windows-directory-close
fix(libkernel): clear directory metadata on close
2026-10-02 22:21:30 +03:00
boykopovar 41cb304326
Merge pull request #244 from RomainROCH/codex/fix-save-replacement
fix(savedata): preserve existing saves on replace failure
2026-10-02 22:20:58 +03:00
boykopovar 74bdce6f04
Merge pull request #232 from MichonGoddijn231849/fix/guest-read-destination
fix(libkernel): read, pread, AIO and APR write into guest memory as host writes
2026-10-02 22:19:46 +03:00
boykopovar 7db340de2b
Merge pull request #231 from MichonGoddijn231849/fix/guest-arena-reserve
fix(libc): reserve the guest arena at its fixed range around what Windows already placed in it
2026-10-02 22:15:26 +03:00
Dean Galvin b62d02c2af feat(avplayer): decode H.264 and AAC with FFmpeg
Replace the decoder-less AvPlayer with a player that demuxes MP4 sources
with FFmpeg (opened by path or through the title's file replacement),
decodes H.264 and AAC on their own threads, and hands out NV12 frames and
interleaved 16-bit PCM in buffers from the title's allocators, presented
on a media clock that audio drives when it is enabled.

Both libSceAvPlayer and libSceAvPlayer.native are built from the same
sources and link the shared ffmpeg target. The struct size checks stay,
next to the types in SceTypes.hpp. ChangeStream and GetStreamInfoEx are
implemented; Init without allocators, StartEx, SetAvailableBandwidth,
SetLogCallback and negative trick speeds succeed as before and are listed
in TechnicalDebt. HLS sources throw.

guest_avplayer plays an embedded 6 KB MP4 (H.264 plus two AAC tracks).
2026-10-03 08:10:55 +13:00
boykopovar 1cc9874ac1
Merge pull request #227 from adriadam10/feat/png-enc
feat(libScePngEnc): implement PNG encoding
2026-10-02 22:08:05 +03:00
boykopovar 4c7a9ea2b0
Merge pull request #226 from asimplestray/feat/shader-mimg-gather-sample
feat(shader): implement MIMG sample/gather flag variants
2026-10-02 22:07:36 +03:00
boykopovar 5572f6b143
Merge pull request #399 from boykopovar/fix/f16-nle-compare-lowering
fix(shader): lower f16 NLE comparisons through swapped unordered less…
2026-10-02 22:06:31 +03:00
boykopovar 0032decb6a ci(tests): run build tests three times 2026-10-02 22:02:20 +03:00
boykopovar 329c007514
Merge pull request #402 from boykopovar/docs/build-and-manual-md
Docs/build and manual md
2026-10-02 21:59:32 +03:00
boykopovar 545b137097 docs(usage): add relinker usage md doc 2026-10-02 21:50:35 +03:00
boykopovar ee6a4a00f4 docs(build): add prject build md instruction 2026-10-02 21:40:38 +03:00
boykopovar a80d1fd09b fix(shader): lower f16 NLE comparisons through swapped unordered less-than 2026-10-02 21:17:18 +03:00
DotDebian 4a4a1eddc1 feat(shader): implement v_lerp_u8
Decode VOP3 0x14d and translate it as the per-byte average of S0 and S1,
rounded up where bit 0 of the matching S2 byte is set and truncated
otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 18:57:06 +02:00
DotDebian 9f2319b46e feat(shader): implement v_sad_u8, v_sad_hi_u8, v_sad_u16 and v_msad_u8
Decode VOP3 0x15a, 0x15b, 0x15c and 0x171 and translate them as the
unsigned sum of absolute differences over the byte or word fields of
the first two sources, accumulated into the third. v_sad_hi_u8 shifts
the sum into the high half first, v_msad_u8 skips the fields whose
reference byte in the second source is zero.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 18:25:22 +02:00
asimplestray 20f12cc80e feat(shader): implement legacy float multiply-add ops 2026-10-02 16:04:44 +00:00
asimplestray f6e689de2f feat(shader): implement MIMG sample/gather flag variants 2026-10-02 15:59:39 +00:00
boykopovar 313de1c5a3
Merge pull request #289 from SP4C3B4R-8/feat/missing-exports
feat(libs): declare missing AudioPropagation, AudioIn, NpSessionSignaling and dialog exports
2026-10-02 16:51:14 +03:00
DotDebian ba512363b1 feat(libkernel): implement sceKernelSyncOnAddressWait and sceKernelSyncOnAddressWake
sceKernelSyncOnAddressWait parks the calling thread while the 32-bit word
at the address still holds the expected value, until
sceKernelSyncOnAddressWake releases it or the timeout expires.
sceKernelSyncOnAddressWake releases up to the requested number of threads
parked on the address, in arrival order.

The libc.prx bundled with SDK 9 titles imports both for its once
primitive, so those titles stopped at load with an unresolved import.

# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-02 16:49:44 +03:00
boykopovar a4157bbeee
Merge pull request #355 from DotDebian/feat/map-named-flexible-memory-internal
feat(libkernel): implement sceKernelMapNamedFlexibleMemoryInternal
2026-10-02 16:45:58 +03:00
boykopovar 0a2f99147f
Merge pull request #296 from Pouare514/feat/libSceJpegDec
feat(libSceJpegDec): implement JPEG decoding
2026-10-02 16:45:18 +03:00
boykopovar e00b491465
Merge pull request #286 from SP4C3B4R-8/feat/windows-mapping-hints
feat(libkernel): support mapping address hints and no-overwrite fixed mappings on Windows
2026-10-02 16:41:43 +03:00
DotDebian 74fcea27f8 feat(libkernel): implement sceKernelMapNamedFlexibleMemoryInternal
libkernel did not export sceKernelMapNamedFlexibleMemoryInternal, which
the libc bundled with SDK 9 titles imports. It now forwards to
sceKernelMapNamedFlexibleMemory: the mapping counts against the flexible
budget, gets the range name and is released by sceKernelMunmap. Older
libc builds call the public function at the same sites with the same
arguments and result handling.

The known callers pass flag 0x8000, whose meaning is unknown. It is
still rejected as an unsupported mapping flag and is recorded in
TechnicalDebt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 14:08:58 +02:00
Pouare514 c9ec561697 feat(libScePlayGoDialog): add PlayGo install dialog 2026-10-02 13:34:54 +02:00
Pouare514 8bd9670ab0 feat(libSceJpegDec): implement JPEG decoding 2026-10-02 13:34:41 +02:00
Pouare514 f1a3d60b15 fix(libkernel): boot Dreaming Sarah past unwind and debug raise 2026-10-02 13:34:35 +02:00
boykopovar e1654a97e5
Merge pull request #259 from adriadam10/feat/vopc-compare-gaps
feat(shader): implement the missing non-f64 VOPC compares
2026-10-02 11:14:37 +03:00
boykopovar 8ed9e7ab5e
Merge pull request #257 from adriadam10/feat/vop3-integer-gaps
feat(shader): VOP3 v_add/sub_nc_i32 (clamp), v_mul_lo_u16, 16-bit mads, v_ashrrev_i64
2026-10-02 11:13:30 +03:00
boykopovar 623c0d8dc6
Merge pull request #254 from adriadam10/fix/shader-writelane
fix(shader): select the written lane in v_writelane_b32
2026-10-02 11:13:02 +03:00
Adrià Franch 58f90eea9d feat(libScePngEnc): implement PNG encoding
scePngEncQueryMemorySize, scePngEncCreate, scePngEncEncode and
scePngEncDelete encode R8G8B8A8 and B8G8R8A8 images with a pitch into
RGB or RGBA PNGs using the shared encoder in core/Decoder/Png.
Decoder::Png::Encode takes optional compression level and filter
options so the encode parameters are honoured.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-02 10:00:32 +02:00