Commit Graph
14017 Commits
Author SHA1 Message Date
Adrià d106eefb8a Merge pull request #5713 from Ondra97/codex/fix-audit-partial-source-stamp
fix(tools): retain source commit when Git status fails
2026-10-15 14:12:10 +02:00
Adrià 1036905b5f Merge pull request #5565 from Dripl1x/feat/socket-options-nodelay-nosigpipe-nbio
feat(libkernel): answer TCP_NODELAY, SO_NOSIGPIPE and SO_NBIO on a guest socket
2026-10-15 14:11:15 +02:00
Adrià 264a528877 Merge pull request #5556 from Nixitov/feat/rtprio-thread
feat(libkernel): implement rtprio_thread and the pthread concurrency controls
2026-10-15 14:10:58 +02:00
milescovielloandClaude Opus 5.5 2c9ab96a0b fix(agc): link agc_driver_pm4_tests against the shader recompiler
Since #5364, Draw/DrawRegisterKey.hpp includes Shaders/ShaderRegistry.hpp,
which reaches ShaderMemory.hpp and its "Recompiler.hpp". tests/Pm4.cpp
includes DrawRegisterKey.hpp, but agc_driver_pm4_tests only links
libSceAgcDriver, libc and libkernel, so the recompiler's include
directories are not on its path and Pm4.cpp no longer compiles. The test
targets that already reach ShaderMemory.hpp link shader_recompiler_agc_driver;
this one now does too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 12:06:06 +00:00
Adrià 34454bd835 Merge pull request #5689 from Ondra97/codex/fix-overlap-main-conflicts
fix(tools): report comparisons blocked by base conflicts
2026-10-15 14:03:53 +02:00
Jan ŠléglandClaude Opus 5.5 c191342fa1 fix(shader): repeat phi folding until no phi folds
ConstantFolder::Fold visits each instruction once, in block order. A loop
header phi whose back-edge value is a later phi that folds to it in the
same pass, such as the header phi of an inner loop in which an S# is
copied out and back, is visited before that phi folds and stays a phi of
its one definition and itself. Later folds run only after read-lane or
masked-select elimination changed the program, and since #4150 the one
after masked-select elimination only runs in programs where a
PackedAncillary builtin still has live uses.

These phis reach resource tracking, which compares descriptor dwords as IR
values, so the phi of an S# and the S# itself become two samplers. Two
PPSA11386 (007 First Light) pixel shaders each had 21 direct samplers for
6 distinct S# values; at two heap slots each they exceed the 32 sampler
slots, and the shaders stopped at their first draw with "shader sampler
pairs exceed runtime heap capacity".

After its pass over the instructions, Fold now folds the phis of its
blocks again until a pass folds none. Each fold turns a phi into an
Identity, so the loop ends. Replayed on an older local branch with #4150's
restriction in place, the captured requests plan 6 samplers each, one per
distinct S#, and recompile. agc_shader_memory compiles an S# copied out
and back in three nested loops and sampled before and inside them, with
and without a masked write: one sampler and one sampled pair each, two of
each before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 14:03:34 +02:00
Dean Galvin af4e074a02 fix(agc): save pending storage results in every 64 KiB block that leaves the write watch
On Windows the write watch is dropped in whole 64 KiB blocks
(WriteWatchCoverage::Exclude), but the unwatch hook was given the page
range of the import. An image with results pending in the same block as
an imported page, outside that page, lost the watch without its guest
bytes saved, and storing its results threw.

The hook now gets the span of blocks Exclude drops (ExcludedSpan, the same
block math), so every image with results pending in those blocks saves its
bytes first.
2026-10-15 14:01:01 +02:00
Adrià Franch c9a96a548c fix(agc): pass the native HTILE clear extent after the pipeline drain 2026-10-15 14:00:57 +02:00
Romans Pokrovskis 9e27d0b623 fix(agc): bound native HTILE clears to the kernel offset span 2026-10-15 14:00:57 +02:00
Romans Pokrovskis 06b787f25d test(agc): refuse a mask with an uncleared HTILE key 2026-10-15 14:00:57 +02:00
Romans Pokrovskis 764f0ace02 test(agc): exercise native HTILE producers and clear refusals 2026-10-15 14:00:57 +02:00
Romans Pokrovskis 7d0dd69f0a feat(agc): import completion-proven native HTILE clears 2026-10-15 14:00:57 +02:00
Romans Pokrovskis 99e6003098 feat(agc): prove complete tracked driver store coverage 2026-10-15 14:00:57 +02:00
Romans Pokrovskis 5fec3f600b test(agc): exercise completed native HTILE clears 2026-10-15 14:00:57 +02:00
Adrià b3f9f89e62 Merge pull request #5604 from babyhuey/fix/agc-geometry-vgpr-count
fix(agc): accept geometry programs with fewer GS and ES input VGPRs
2026-10-15 13:59:30 +02:00
hypermistandClaude Opus 5.5 6d2708ab95 feat(libc): implement the 16-byte __sync builtins and __atomic_is_lock_free
__sync_fetch_and_{add,sub,and,or,xor}_16 and __sync_lock_test_and_set_16 are
cmpxchg16b loops returning the previous value, and __atomic_is_lock_free
answers by size and alignment, as in the libc.prx bundled with PPSA08427. Its
generic __atomic_load/store/exchange/compare_exchange are a ud2, so they throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q8tinbP1MUpUaDsbNWnGnu
2026-10-16 00:59:12 +13:00
Adrià 7bb2b1f973 Merge pull request #5598 from JJenkx/fix/guest-declared-host-import-registry
fix(relinker): record declared host imports in guest registries
2026-10-15 13:58:59 +02:00
fdfawef324andClaude Opus 5.5 6a9b3d6fad docs(agc): record the BMP open failure measured on presentation
VideoOut flips on an RTX 3060 now show that a first frame dump that cannot be opened no longer stops presentation. Header, pixel and close failures remain measured only by the CPU fixture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 07:56:13 -04:00
Adrià 55d2fb6dfe Merge pull request #5659 from wachi35676/fix/libSceSaveData.native-memory-data-stride
fix(savedata): read every sceSaveDataSetSaveDataMemory2 data entry at its 64-byte stride
2026-10-15 13:56:05 +02:00
AlxcBTW 139e3b86ed fix(agc): route native-owned depth binds before the HTILE read and store-back
A multisampled depth target is created as, or already is, the native depth owner, and a target whose HTILE overlaps a resident depth guard aliases one. Neither may have its HTILE read or rewritten by the generic store-back: the expanded words would be a guest write over the owner's range. DepthSurfaceView decides this before the store-back, which still runs before GpuMutex() and the surfaces mutex are taken. NativeMultisampleDepth binds the owner and a single-sample alias of its HTILE and checks the words stay untouched.
2026-10-15 13:55:39 +02:00
Adrià 97d3bd3bc8 Merge pull request #5658 from wachi35676/fix/libSceAjm.native-at9-channel-config
fix(libSceAjm.native): reject ATRAC9 config data with a reserved channel configuration
2026-10-15 13:55:34 +02:00
hypermistandClaude Opus 5.5 f8b611b7da feat(libc): implement the compiler-rt floating-point builtins
Soft-float arithmetic and comparisons, float/double/x87 conversions to and from
32-, 64- and 128-bit integers, __extendsfdf2, __truncdfsf2, complex
multiplication and division and __powixf2, matching the libc.prx bundled with
PPSA08427: soft-float results ignore MXCSR and raise no flags, division flushes
subnormal quotients, NaN payloads are moved unshifted and float-to-integer
conversions do not saturate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q8tinbP1MUpUaDsbNWnGnu
2026-10-16 00:55:33 +13:00
Adrià 23dcb82499 Merge pull request #5648 from Amoenus/codex/buffer-resource-vcc-tuple
fix(shader): accept buffer resource tuples ending in VCC
2026-10-15 13:55:14 +02:00
Adrià Franch 0a7193b5cd fix(libkernel): sigsuspend swaps and restores all four mask words 2026-10-15 13:54:05 +02:00
AlxcBTW cc022df348 fix(agc): take a slice of a depth array from its own HTILE only when its words are uniform
A fill or clear the driver recognizes over an HTILE drops the range's last-read generation, so the
next bind reads the words and stores them back even when the write tracker did not see the fill's
stores. A depth view of slice 1 or later reads the HTILE at its own address
(DB_HTILE_DATA_BASE + slice * HtileMetadataBytes); the HTILE word layout is only modelled for slice 0,
so such a slice takes the clear and the store-back only when all its words are equal and keeps its
fill-time fast clears otherwise. DepthTarget::slice carries DB_DEPTH_VIEW SLICE_START.

agc_driver_depth_fast_clear_submit: an unrecognized kernel clears the HTILE on two frames in a row and
both clears are taken; slice 1 with words that are not all equal is refused and stored back untouched;
slice 1 with equal words takes the clear. agc_driver_graphics checks the decoded slice.
2026-10-15 13:53:50 +02:00
AlxcBTW 3e61fcf1f9 fix(agc): read and store back the whole pipe-aligned HTILE outside the surfaces lock
The bind-time HTILE read covered one word per 8x8 tile from DB_HTILE_DATA_BASE, but main models the
HTILE as the pipe-aligned SW_64KB_Z_X metadata (HtileMetadataBytes, the extent HtileFillCovers takes):
at 1920x1080, 1856 of the 32400 tile words lie past the first tiles*4 bytes, so they kept ZMask 0
after a store-back. The read and the store-back now cover the whole metadata and run before the
surfaces mutex is taken, since both wait for recorded work over the range. The tests' HTILE arrays
hold the whole metadata.

PPSA25344 (Unreal Engine 5) decodes its depth through HTILE in its Nanite depth export after the
depth prepass and takes ZMask 0 as a tile holding the clear value; the new
agc_driver_depth_fast_clear_submit case checks that a draw after a fast clear leaves every word
expanded.
2026-10-15 13:53:50 +02:00
esatturan 4ddff7c6e5 fix(agc): take depth fast clears from HTILE written by any kernel 2026-10-15 13:53:49 +02:00
aaroandCodex 5054b67b42 fix(relinker): preserve inputs behind Windows executable hard links
Co-authored-by: Codex <[email protected]>
2026-10-15 17:23:14 +05:30
MarcZX100 e168591c19 fix(libkernel): honor all guest signal mask words 2026-10-15 13:52:40 +02:00
hypermistandClaude Opus 5.5 667e8ad80c fix(libc): count zero bits of zero like the console's __clz and __ctz builtins
The libc.prx bundled with PPSA08427 returns 32 from __clzdi2 and __ctzdi2 and
64 from __clzti2 and __ctzti2 for a zero argument; found by comparing every
builtin against it on random inputs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q8tinbP1MUpUaDsbNWnGnu
2026-10-16 00:51:46 +13:00
Adrià fdea36b836 Merge pull request #5524 from Amoenus/codex/native-depth-allocation-retirement
fix(agc): retire fully released native depth owners
2026-10-15 13:50:13 +02:00
Adrià FranchandClaude a8be2c8fee docs(ngs2): matrix levels debt line names the voice-without-format exception
Co-Authored-By: Claude <[email protected]>
2026-10-15 13:49:09 +02:00
milescovielloandClaude Opus 5.5 c6e3af3258 fix(ngs2): accept empty waveform blocks and matrix levels on a voice without a format
A sampler voice set up with an all-zero format has no channels. Adding no
waveform blocks to it, or setting a matrix with no levels, threw
std::invalid_argument, which ends the title.

Accept both on such a voice: the empty add only applies RESET and the
CONTINUE state, and the empty matrix clears that matrix, which rendering
already treats as unset. Blocks with data, APPEND, and an empty matrix on
a voice with a format are still refused.

Steins;Gate Re:Boot (PPSA36591) clears a voice this way when a button is
pressed at its title screen.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 13:48:54 +02:00
Amirerfan TeimooriandClaude Opus 5.5 d4b40a37f1 refactor(relinker): remove functions nothing calls
GuestImageReader::ReadModuleNames lost its only caller in 41126bfa5.
EmitShiftImm and ElfReader::ReadSection have no callers.
ValidationPolicy's NID, SCE structure size, dynamic field and syscall
instruction checks are never called, ValidateSyscallAbsence is empty,
and RegisterLibraryImport only fills the library set that the unused
NID check reads.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 15:16:49 +03:30
Adrià 6ea62f9b40 Merge pull request #5364 from MarcZX100/marc/trace-draw-key-misses
feat(agc): trace draw-key cache misses
2026-10-15 13:41:58 +02:00
ps54allandClaude Opus 5.5 21cdb8f057 fix(agc): store an image-copied buffer copy's destination before later labels
A buffer copy whose source is exactly a live storage image becomes a device
copy between images (AliasCopy). Its results stayed pending in the destination
image and reached guest memory only at a later flush, so a guest that waits
for a label recorded after the copy and reads the destination on the CPU (a
readback) read the bytes from before the copy. Store the destination's results
in the same batch, behind the image copy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 13:41:36 +02:00
ArjenS-LA 00c704697b docs(relinker): keep import class table beside its introduction 2026-10-15 04:41:05 -07:00
fdfawef324andCodex 6541db004b fix(agc): disable optional BMP dumps after host I/O failures
Use checked host stdio for BMP output and stop requesting dumps after the first write failure. Keep pixel validation, allocation and non-I/O failures on the existing fatal path.

Co-Authored-By: Codex <[email protected]>
2026-10-15 07:39:36 -04:00
Adrià f50d4335ab Merge pull request #5587 from nikowolf123/fix/relinker-dependency-diagnostics
fix(relinker): name missing and non-PE modules in Windows dependency diagnostics
2026-10-15 13:39:17 +02:00
Adrià 38d2454486 Merge pull request #5559 from JJenkx/fix/guest-executable-import-dependencies
fix(relinker): select guest startup dependencies from required roots
2026-10-15 13:38:52 +02:00
fdfawef324andClaude Opus 5.5 d353c6bccf fix(shader): fold only constant lower-half lane words of vertex programs
FoldVertexLaneBounds replaced every LaneId < 32 compare of a vertex
program on a fixed 32-lane host subgroup with true. The half-wave scan
matcher of the SPIR-V backend recognises a lane word by the select of its
low and high words on that compare. A scan keyed by the entry EXEC ballot
lost that shape, so its v_readlane_b32 of lane 63 was no longer read as a
half-wave reduction and the recompile failed (agc_shader_memory).

Fold the lane word select itself instead, and only when both words are
constants. Lane words built from ballots or other values keep their
lower-half test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 07:38:42 -04:00
fdfawef324andCodex dfc71c8418 fix(agc): fold bounded vertex lane masks before stencil replay
Preserve replay refusal for observable lane-dependent values, non-vertex stages, unknown subgroup widths and varying-size modules. Validate the actual native vertex subgroup contract and retain compiled single-lane targets.

Co-Authored-By: Codex <[email protected]>
2026-10-15 07:38:40 -04:00
Adrià ab808e9d88 Merge pull request #5558 from JJenkx/fix/audio-output-conversion-state
fix(audioout): preserve conversion state across output blocks
2026-10-15 13:38:36 +02:00
fdfawef324andCodex da0d5b2be3 test(agc): retain non-null depth feedback refusal
Co-Authored-By: Codex <[email protected]>
2026-10-15 07:38:27 -04:00
fdfawef324andCodex af8a8b28a0 test(agc): copy stencil null fixture words before mutation
Co-Authored-By: Codex <[email protected]>
2026-10-15 07:38:27 -04:00
fdfawef324andCodex e25bb140f9 fix(agc): preserve null images during stencil feedback checks
Co-Authored-By: Codex <[email protected]>
2026-10-15 07:38:26 -04:00
Adrià 5050a23f38 Merge pull request #5473 from MarcZX100/type0-recompiler-followup-4779
fix(shader): accept TYPE=0 images during materialization
2026-10-15 13:37:52 +02:00
Yunus Shaikh e09870006d refactor(agc): add the overlay's driver time after the worker profile report
#6292 moves the APS5_PROFILE_DRAW check in Driver::timed to the top and
rewrites the report's condition, the two lines this branch's driver-time
line sat between, so the two conflicted. The line now follows the
report. It reads the same flag and times, so it counts the same.
2026-10-15 04:35:02 -07:00
Muhammad Wasif Ali WasifandClaude Opus 5.5 f3a44a9be2 fix(libSceAjm.native): reject ATRAC9 config data with a reserved channel configuration
LibAtrac9 defines six channel configurations but indexed the table with all eight values of the 3-bit field, so indices 6 and 7 read past it and initialized a decoder from the bytes that follow. The config data check now fails for them, which sceAjmDecAt9ParseConfigData, AJM initialization, libSceAudiodec and NGS2 already report as invalid config data.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 13:34:21 +02:00
David 4c4980e0bb test(relinker): keep refusing a macOS TLS ALU read outside the thread TLS block 2026-10-15 15:32:49 +04:00