Commit Graph
900 Commits
Author SHA1 Message Date
Dean 396b282315 Merge pull request #339 from DotDebian/feat/cpu-time-clocks
feat(libkernel): support the CPU-time clocks in clock_gettime and clock_getres on Windows
2026-10-04 14:21:40 +13:00
Dean e6505d8a93 Merge pull request #312 from RomainROCH/codex/fix-save-memory-metadata
fix(savedata): report memory metadata write failures
2026-10-04 14:13:01 +13:00
Dean 7384588c35 Merge pull request #411 from MichonGoddijn231849/fix/writelane-ignores-exec
fix(shader): v_writelane_b32 ignores EXEC
2026-10-04 14:06:16 +13:00
Dean d77b96fd44 Merge pull request #403 from MichonGoddijn231849/perf/pending-image-index
perf(agc): index the pending storage images by guest range
2026-10-04 14:06:00 +13:00
Dean deb7e0dfff Merge pull request #363 from DotDebian/test/sopk-cmpk-compares
test(shader): cover the s_cmpk compares and count them as tested variants
2026-10-04 14:05:04 +13:00
Dean ad473fa569 Merge pull request #389 from DotDebian/feat/mimg-sample-d-cl-o
feat(shader): decode image_sample_d_cl_o
2026-10-04 14:04:47 +13:00
Dean 0207f9ca9a Merge pull request #388 from DotDebian/fix/mimg-sample-lod-clamp
fix(shader): let image samples clamp their LOD on devices with shaderResourceMinLod
2026-10-04 14:04:31 +13:00
Dean 0df090c30b Merge pull request #386 from DotDebian/feat/vop3p-integer-dot
feat(shader): implement the integer dot products
2026-10-04 14:04:14 +13:00
Dean ea07493147 Merge pull request #372 from DotDebian/feat/shader-s-wakeup
feat(shader): decode s_wakeup as a no-op
2026-10-04 14:03:57 +13:00
Dean b19e9761fa Merge pull request #348 from julienlgy/feat/lib-sce-audio3d-port-close
feat(libSceAudio3d): add missing sceAudio3dPortClose stub
2026-10-04 14:03:40 +13:00
Dean 1137cffb72 Merge pull request #429 from RomainROCH/codex/fix-rfc3339-offsets
fix(rtc): reject invalid RFC 3339 timezone offsets
2026-10-04 14:03:23 +13:00
Dean 1964aad443 Merge pull request #428 from RomainROCH/codex/fix-posix-semaphore-limits
fix(libkernel): enforce POSIX semaphore count limits
2026-10-04 14:03:06 +13:00
Dean 12db9a8fcf Merge pull request #420 from MichonGoddijn231849/fix/ajm-batch-job-size
fix(ajm): a decode job fits the 64-byte batch titles allocate
2026-10-04 14:02:48 +13:00
Dean dfac4ab1ec Merge pull request #412 from arreina/pr/pixel-position-export
fix(shader): reject position exports without vertex input info
2026-10-04 14:02:31 +13:00
Dean e656baf20b Merge pull request #398 from Pouare514/fix/libc-fopen-enoent
fix(libc): return NULL with ENOENT for missing files in fopen
2026-10-04 14:02:14 +13:00
Dean d0bec2e448 Merge pull request #378 from DotDebian/fix/posix-file-errno
fix(libkernel): return -1 and set errno from the POSIX open, stat, unlink and rmdir
2026-10-04 14:01:57 +13:00
Dean a6cdfa1c7f Merge pull request #352 from arreina/pr/savedata-delete-dir-name
fix(savedata): reject invalid directory names in sceSaveDataDelete
2026-10-04 14:01:40 +13:00
Dean e5676b3f0e Merge pull request #315 from RomainROCH/codex/fix-semaphore-overflow
fix(libkernel): avoid semaphore count overflow
2026-10-04 14:01:19 +13:00
Dean e50c18a42d Merge pull request #314 from RomainROCH/codex/fix-fgetpos-error
fix(libc): propagate file position errors
2026-10-04 14:01:01 +13:00
Dean 1dd1be67e3 Merge pull request #262 from RomainROCH/codex/fix-aligned-delete
fix(libc): release aligned allocations through the application heap
2026-10-04 14:00:42 +13:00
Dean 85959469a4 Merge pull request #478 from oneandonlydean/fix/libc-unwind-c-personality
fix(libc): run the cleanups of frames that use the C personality
2026-10-04 11:34:58 +13:00
Dean 1e54dae613 Merge pull request #466 from oneandonlydean/perf/agc-shared-dcc-keys
perf(agc): keep a surface's storage image when another descriptor names uncompressed DCC keys
2026-10-04 11:34:41 +13:00
Dean 53d1ebc10f Merge pull request #459 from oneandonlydean/perf/agc-own-stack-verify
perf(agc): answer verifications of the caller's own live stack without a page query
2026-10-04 11:34:24 +13:00
Dean c416d9e221 Merge pull request #458 from oneandonlydean/perf/agc-dcc-keys-without-wait
perf(agc): read DCC keys behind the driver's own pending key store without a wait
2026-10-04 11:34:07 +13:00
Dean 0990e9a695 Merge pull request #456 from oneandonlydean/feat/shader-replay-code-words
feat(agc): let agc_shader_replay write a request's code words for other disassemblers
2026-10-04 11:33:49 +13:00
Dean 7fc6f0e10c Merge pull request #445 from oneandonlydean/fix/recompiler-readfirstlane-empty-exec
fix(recompiler): v_readfirstlane_b32 of an empty EXEC reads lane 0
2026-10-04 11:33:32 +13:00
Dean b6673c793c Merge pull request #444 from oneandonlydean/perf/agc-lazy-check-messages
perf(agc): build check failure messages only when a check fails
2026-10-04 11:33:15 +13:00
Dean 98004c632d Merge pull request #443 from oneandonlydean/fix/agc-write-data-pfp
fix(agc): accept WRITE_DATA with ENGINE_SEL = PFP
2026-10-04 11:32:58 +13:00
Dean d8e2609831 Merge pull request #442 from oneandonlydean/fix/agc-host-page-query-gap
fix(agc): describe the pages after a gap in a Linux host page query
2026-10-04 11:32:41 +13:00
Dean be7d33be9c Merge pull request #441 from oneandonlydean/fix/agc-partial-block-write-coverage
fix(agc): keep a surface's results in the 64 KiB block it shares with its neighbour
2026-10-04 11:32:24 +13:00
Dean 3bc8e94324 Merge pull request #439 from oneandonlydean/fix/agc-dma-copy-on-gpu
fix(agc): record large memory-to-memory DMA_DATA copies on the GPU in queue order
2026-10-04 11:32:07 +13:00
Dean 1961af9f9c Merge pull request #415 from oneandonlydean/perf/recompiler-srt-memo-table
perf(recompiler): memoize SRT evaluation in a flat table and inline IrValue's hot accessors
2026-10-04 11:31:50 +13:00
Dean 27c5026367 Merge pull request #414 from oneandonlydean/fix/recompiler-descriptor-phi-split
fix(recompiler): split image reads whose T# or S# is a Phi of SRT reads
2026-10-04 11:31:33 +13:00
Dean 0990ee4e93 Merge pull request #410 from oneandonlydean/perf/agc-interleaved-vertex-copy
perf(agc): copy the interleaved attributes of a vertex buffer once per draw
2026-10-04 11:31:16 +13:00
Dean 7f5c3ec9b7 Merge pull request #417 from oneandonlydean/fix/agc-flip-after-gpu
fix(agc): complete a flip only once the frame's GPU work has finished
2026-10-04 11:30:22 +13:00
Dean fc2cbb25ac Merge pull request #413 from oneandonlydean/fix/recompiler-early-return-merge
fix(recompiler): give an early-return selection that joins its parent's merge a merge of its own
2026-10-04 11:30:06 +13:00
Dean ef1d2c03bc Merge pull request #408 from oneandonlydean/perf/agc-flat-queue-registers
perf(agc): keep a queue's registers in flat arrays instead of a std::map
2026-10-04 11:29:51 +13:00
Dean Galvin 6670c52571 fix(libc): run the cleanups of frames that use the C personality
GCC gives C code built with -fexceptions, and cleanup-only functions
after link-time optimization, the C personality __gcc_personality_v0.
The unwinder accepted only its own C++ personality, so an exception
thrown through such a frame was never caught.

libc now provides the C personality, which never catches and installs
the frame's cleanup landing pad in the cleanup phase, and the unwinder
calls it for those frames.
2026-10-04 05:32:55 +13:00
Dean Galvin a431082abc perf(agc): keep a surface's storage image when another descriptor names uncompressed DCC keys
PPSA21564's galaxy map renders a 1920x1080 surface as a color target whose
CB names DCC keys at one address and then writes it from a compute shader
whose T# names keys at another. Both key ranges read uncompressed every
frame, but the storage cache remade the surface's image whenever a
descriptor named metadata other than the image's, so the image was
flushed, destroyed, created and uploaded twice a frame (1231 constructions
in a 56 s scene), with the views and draw recipes built on it thrown away
each time.

A descriptor naming other keys now keeps the image when the move is
unobservable: the image's own keys and the named keys both read
uncompressed, and its content was neither uploaded nor filled under a
clear code. That is exactly the content an image made under the named
keys would hold once this one's pending results were stored. Any other
case (a fast clear of either key range, a register clear, an image
holding a clear) still remakes the image as before, so clears of the new
keys reach it and pending results are stored first.

Every proof that stands in for a lookup checks the same rule: the sampled
view hit, the fast revalidation of views and storage elements (storage
elements now record their descriptor's keys), the own-object refresh, and
the draw recipe's resident targets. Named-key scans keep per-image proofs,
so a repeated check costs no scan while the key bytes are unstamped.

agc_dcc_key_sharing drives KeysServeSurface, the rule ServesKeysAt uses,
through a model of the storage cache.
2026-10-04 03:20:46 +13:00
Dean Galvin 5a8165282f perf(agc): answer verifications of the caller's own live stack without a page query
Driver::Submit checks the title's submission packet, which the title
passes on its own thread stack. Host thread stacks are neither registry
mappings nor write-watched, so no page-state cache covers them and on
Linux every check scans /proc/self/maps line by line: about 1.5 ms per
submission on the render thread of PPSA21564 (66% of that thread's
samples in perf at the title).

A range between the calling thread's current frame and its stack's top
holds the frames of every caller, so it is mapped readable and writable
for as long as the call lasts; verify() now accepts it without a query.
A thread on another stack (a fiber's, a signal stack) has its frame
outside the thread's bounds and still gets the page query, as does any
range that runs past the stack's top or starts below the frame.

GetCurrentThreadStackLimits needs _WIN32_WINNT 0x0602 on MinGW, as
libkernel already sets; GuestMemory.cpp is compiled by several targets,
so the definition is a property of the source file.
2026-10-04 03:02:25 +13:00
Dean Galvin fb6b131def perf(agc): read DCC keys behind the driver's own pending key store without a wait
A CB metadata pass (and a resident target's register-clear check) read the
DCC keys with CurrentDccKeys, which waited for the GPU whenever recorded
work wrote the key range. In the intro video of PPSA21564 about 800 passes
per 10 s waited about 1.8 ms each, and every one of those waits was behind
a key store whose result the driver already knew: its own uncompressed key
store, or a title fill of uniform keys recorded on the GPU.

Pending-write notes now carry a serial in recording order, and the key
memo remembers the note of the store it describes. When the newest
pending note over the keys is that store's own note, nothing recorded
after it writes the keys, so they read as the store's keys without a
wait. Any later writer, a range the store does not cover, or a unit
shadow over the keys waits as before.
2026-10-03 21:45:10 +13:00
Dean Galvin 8fafe96888 feat(agc): let agc_shader_replay write a request's code words for other disassemblers
--code writes the shader's code as <request name>.code in the working directory, as raw
little-endian words for llvm-mc -triple amdgcn -mcpu=gfx1030 --disassemble. --asm prints only
the first word of each instruction.
2026-10-03 21:45:10 +13:00
Alexey d3ec1f15fb Merge pull request #371 from DotDebian/feat/smem-get-waveid-in-workgroup
feat(shader): implement s_get_waveid_in_workgroup
2026-10-03 11:16:32 +03:00
Alexey 87f016b0da Merge pull request #370 from DotDebian/fix/pthread-attr-get
fix(libkernel): report the thread's priority and affinity from scePthreadAttrGet
2026-10-03 11:02:46 +03:00
Alexey 5335ce0316 Merge pull request #368 from DotDebian/feat/mimg-image-atomics
feat(shader): implement the missing integer image atomics
2026-10-03 11:02:17 +03:00
Alexey 9e062154d3 Merge pull request #366 from DotDebian/feat/shader-vop1-pipeflush-clrexcp
feat(shader): decode v_pipeflush and v_clrexcp as no-ops
2026-10-03 11:01:34 +03:00
Alexey b4b261a806 Merge pull request #365 from DotDebian/feat/vopc-f64-compares
feat(shader): implement the VOPC f64 compares
2026-10-03 11:01:18 +03:00
Alexey e1bfb3973f Merge pull request #364 from DotDebian/feat/pthread-barrierattr
feat(libkernel): implement the pthread_barrierattr functions
2026-10-03 11:01:01 +03:00
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