Commit Graph

1165 Commits

Author SHA1 Message Date
Alexey a818beedf5
Merge pull request #341 from DotDebian/feat/kernel-cancel-sema
feat(libkernel): implement sceKernelCancelSema
2026-10-03 10:58:13 +03:00
Alexey 9f7e6499bd
Merge pull request #335 from DotDebian/feat/kernel-event-accessors
feat(libkernel): implement the sceKernelGetEvent* field accessors
2026-10-03 10:50:28 +03:00
Alexey b45716210c
Merge pull request #326 from adriadam10/feat/scalar-relative-indexing
feat(shader): implement s_movrels/s_movreld (b32, b64) and s_movrelsd_2_b32
2026-10-03 10:35:26 +03:00
Alexey 67fd6385e7
Merge pull request #328 from arreina/pr/json-nesting-limit
fix(json2): reject documents nested deeper than 512 levels
2026-10-03 10:35:04 +03:00
Alexey 1043f90d8a
Merge pull request #324 from adriadam10/feat/shader-memtime
feat(shader): implement s_memtime and s_memrealtime
2026-10-03 10:33:57 +03:00
Alexey 7813a9a1a5
Merge pull request #322 from oneandonlydean/fix/recompiler-readlane-wrap
fix(shader): wrap the v_readlane_b32 lane select at the wave size
2026-10-03 10:33:21 +03:00
Alexey ff96a3b159
Merge pull request #304 from oneandonlydean/perf/recompiler-two-lane-uniform-values
perf(recompiler): emit wave-uniform values once for both lanes of a two-lane invocation
2026-10-03 10:32:37 +03:00
Alexey d7543997f6
Merge pull request #318 from adriadam10/feat/f16-misc-legacy-mul
feat(shader): f16 ldexp/frexp/norm/class, v_sat_pk_u8_i16, v_mul/mac_legacy_f32
2026-10-03 10:31:55 +03:00
Alexey 926906e257
Merge pull request #320 from adriadam10/feat/lds-atomics
feat(shader): implement the missing 32-bit LDS atomics and fix ds_min/max_f32
2026-10-03 10:13:33 +03:00
Alexey 00193ec66f
Merge pull request #311 from asimplestray/feat/shader-sop1-bitcount64
test(shader): cover 64-bit scalar bit-count ops
2026-10-03 10:01:10 +03:00
Alexey 9f1b6a79bf
Merge pull request #306 from oneandonlydean/fix/agc-batch-stamps-under-draw-profile
fix(agc): stamp every batch under APS5_PROFILE_DRAW so the present report's GPU busy is real
2026-10-03 10:00:51 +03:00
Dean Galvin a791e7dd5d perf(recompiler): emit wave-uniform values once for both lanes of a two-lane invocation
A wave64 compute or mesh program on a 32-wide host runs two lanes per
invocation, and the emitter emitted every IR value once per lane, scalar ones
included: each SGPR value, scalar memory load and loop phi existed twice in
the module, raising register pressure for every such program.

WaveUniformValues (SpirvAnalysis) finds the values every lane of the wave
computes alike: user data, constants, resources, ballots, readlane and
readfirstlane results, scalar loads through a wave-uniform address, and what
follows from them alone. Lane ids, builtins other than the workgroup id, lane
exchanges and every other memory or image read differ by lane, as does
anything computed from them. For such a value without side effects, the
second lane reuses the first lane's definition. Both lanes are one
invocation, so they share control flow and the definition dominates every
use of the second lane.

agc_shader_memory checks the analysis and that a two-lane module computes a
scalar product as often as the one-lane module. The agc_driver_wave_uniform
execution test runs a wave64 program with a scalar loop, a ballot and a
readfirstlane and checks every lane's result. It skips on a subgroup
narrower than 32, such as lavapipe's.
2026-10-03 20:00:38 +13:00
Alexey 5dd3c6c338
Merge pull request #278 from oneandonlydean/perf/agc-resident-10bit-scanout
perf(agc): keep the 10-bit scanout resident and present it with the guest path's pixels
2026-10-03 10:00:01 +03:00
Alexey aff499474a
Merge pull request #309 from asimplestray/feat/shader-vopc-const
test(shader): cover VOPC compare constants and ordered F16
2026-10-03 09:58:37 +03:00
Alexey de3344a9e7
Merge pull request #305 from oneandonlydean/fix/recompiler-pixel-helper-lanes
fix(recompiler): start pixel waves without their helper invocations in EXEC
2026-10-03 09:47:30 +03:00
Alexey f3ff6da034
Merge pull request #303 from oneandonlydean/fix/recompiler-computed-texel-offsets
fix(recompiler): sample with texel offsets the guest computes, through maintenance8's Offset
2026-10-03 09:46:58 +03:00
Alexey 29a8d01c83
Merge pull request #297 from oneandonlydean/fix/videoout-open-param-service-thread
fix(videoout): read the open param as the service thread's priority and affinity
2026-10-03 09:46:25 +03:00
Dean Galvin 0e2500786a fix(agc): stamp every batch under APS5_PROFILE_DRAW so the present report's GPU busy is real
The [present] line, printed under APS5_PROFILE_DRAW, takes its GPU busy and
idle gaps from the whole-batch timestamps in each batch's completion record.
Those stamps were only written under APS5_PROFILE_GPU, which also times every
command. Under APS5_PROFILE_DRAW alone every batch finished with zero stamps,
so the line read "GPU busy 0.0 ms, idle gaps 0.0 ms" with no missing records.

Under APS5_PROFILE_DRAW each batch now carries just its two batch stamps in a
two-query pool, reused across batches like the command buffers.
APS5_PROFILE_GPU is unchanged, and nothing is written with profiling off.

agc_driver_recorder_tests (GPU, by hand) checks that three consecutive
batches' completion records carry ordered stamps exactly when batch stamps
are on, and none with profiling off.
2026-10-03 19:44:01 +13:00
Alexey c394893eca
Merge pull request #409 from oneandonlydean/perf/agc-defer-eop-interrupts
perf(agc): deliver end-of-pipe interrupts after their work without draining
2026-10-03 09:35:22 +03:00
Alexey aa23d52878
Merge pull request #416 from oneandonlydean/fix/videoout-flip-release-vblank
fix(videoout): pace the next flip from the vblank a flip was released at
2026-10-03 09:34:19 +03:00
Dean Galvin 33c89d30dc fix(videoout): pace the next flip from the vblank a flip was released at
processFlip set lastFlipVblank to the vblank count after the host present
returned. When the acquire, the wait for an earlier presentation or the
present itself crossed the next vblank, the next flip's target moved out
by one vblank even when that flip was already queued: a frame ready in
17 ms was shown for 33 ms, and a title that advances its logic by a fixed
step per presented frame ran in slow motion.

A flip takes effect at the vblank it is released at, so that vblank is
now the one the next flip's interval counts from, recorded when the flip
is released. Flip events, flipStatus and flipPendingNum are unchanged.

Test: video_out_flip_tests pacing (needs a GPU and a display) submits
the first flip at flip rate 2, whose presentation opens the device and
spans several vblanks, and checks that lastFlipVblank is 3.
2026-10-03 11:15:47 +13:00
asimplestray 51c5e00ba9 test(shader): cover 64-bit scalar bit-count ops 2026-10-02 21:48:23 +00:00
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
Dean Galvin 6142e82aa0 perf(agc): keep the 10-bit scanout resident and present it with the guest path's pixels
PPSA21564's final composite renders into 4K 10-bit scanout buffers
(COLOR_2_10_10_10 with the alternate swap, A2R10G10B10). No guest texture
format matched that color format, so the target stayed non-resident:
every frame's composite draw ran synchronously (about 11 ms, 143 per 10 s
at the title) and the flip read the frame back through guest memory.

The blue-low 10-bit color target now keeps its bits in the storage image
of its surface's red-low 2-10-10-10 format, as B8G8R8A8 targets map to
R8G8B8A8.

Presenting it: DisplayTexelFormat names a display buffer's texel order as
the guest-memory path reads it (R8G8B8A8 base: red low, else blue low;
the 10-bit variant: A2B10G10R10 or A2R10G10B10). ResidentPresentPath
blits a resident image only when it holds the display's 8-bit texel
format (an exact copy). A 10-bit image (whose blit would round where the
guest path drops the low two bits), the other 8-bit order or an sRGB type
is converted instead: GpuColorTransfer::DetileImage copies the image's
texels raw and runs the guest path's own conversion shader on them, so
both paths present the same pixels.

The image's write-back is unchanged: its results stay pending like any
resident target's and are stored when a reader of the memory flushes
them.

Tests: agc_driver_recorder_tests checks the format decision for both
8-bit and both 10-bit orders, and converts an image in each order,
comparing it with the CPU decode and the GPU detile of the same words in
guest memory.
2026-10-03 08:49:27 +13: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