Commit Graph
17691 Commits
Author SHA1 Message Date
roboterspinne 3123f92e7b fix(relinker): reject --lazy-binding for macOS output
MacOsMachOPatcher::Patch discarded its lazyBinding argument, so a
module-free `--macos --lazy-binding` conversion exited 0 and wrote the
same eagerly bound Mach-O as a run without the flag. The Mach-O writer
puts every import in the LC_DYLD_INFO_ONLY bind stream and leaves the
lazy_bind stream empty, with no __la_symbol_ptr or stub helper, so the
macOS target cannot honour the flag. The patcher now throws "macOS
target does not support --lazy-binding", in the form of its
--windows-diagnostics check, so such a conversion exits 2 and writes no
output. Conversions with bundled modules were already refused by the
guest module builder.
2026-10-27 05:59:10 +01:00
al3w0f205 3ad3755487 test(libSceVrSetupDialog): cover reopen and null parameter behavior in finished dialog state 2026-10-26 23:54:48 -05:00
Daniel Castrillon c39b17134c fix(shader): bound runtime formatted-store expansion 2026-10-26 23:52:19 -05:00
Adrià 0a570f617d Merge pull request #10660 from imellag/build/libkernel-elf-fixture-options-not-apple
build(libkernel): keep the ELF-only module fixture options off Apple
2026-10-27 05:51:03 +01:00
MarcZX10 bef1faf9f5 test(libkernel): dup2 onto a descriptor an equeue watches while it waits
Next to CloseWhileWaitingOnFile: 2000 rounds of watching a regular file and replacing its descriptor with dup2 while another thread waits on the queue.
2026-10-27 04:46:00 +00:00
MarcZX10 ea4eaeae42 fix(libkernel): remove a watched descriptor's events before dup2 takes its positioned lock on Windows
dup2 called EqueueDescriptorClosed(to) while holding the positioned-transfer lock of the descriptor, and the in-flight measurement it waits for needs that lock for its sceKernelLseek, so dup2 onto a watched descriptor deadlocked. The events are removed first, before the lock is taken.
2026-10-27 04:46:00 +00:00
MarcZX10 9b9f9b4af8 fix(libkernel): retire an in-flight file measurement on every exit with a guard
MeasureFiles registered the descriptors it measures in m_measuring and removed them only on the normal path, so an exception between unlocking and relocking left them there and every later RemoveDescriptorEvents for one of them waited forever. Both vectors are reserved before anything is registered, and a guard owns the registration: on every exit it relocks if needed, removes the entries and notifies.
2026-10-27 04:46:00 +00:00
MarcZX10 de2b96d8bd fix(libkernel): wait for an in-flight file measurement before closing a watched descriptor 2026-10-27 04:46:00 +00:00
Adrià f5e3dc5e3b Merge pull request #10676 from imellag/fix/agc-libcxx-build-macos
fix(agc): build the pending image snapshot and the queued index read order test with Apple's libc++
2026-10-27 05:45:00 +01:00
Adrià 6856adae6e Merge pull request #10655 from thuanquang/perf/import-watched-parallel-hash
perf(agc): hash the pages of an import window on several threads
2026-10-27 05:44:55 +01:00
Adrià ddd72f488b Merge pull request #10628 from maximilianfv/fix/libscenet-macos-datagram-fionread
fix(libSceNet): count only datagram bytes in sceNetIoctl FIONREAD on macOS
2026-10-27 05:38:46 +01:00
Adrià 50a28679c4 Merge pull request #10528 from akkadbakkad89/fix/direct-remap-block-index
fix(libkernel): walk direct-memory physical ranges by block, not page
2026-10-27 05:35:38 +01:00
Felipebmaitan f75e51c5d4 test(libkernel): cover cancellation during entry-return teardown 2026-10-27 01:30:15 -03:00
Felipebmaitan 152155e484 fix(libkernel): isolate AIO controls in the registry test target 2026-10-27 01:30:11 -03:00
Adrià c3ee5a4253 Merge pull request #10590 from morten-holm/fix/macos-fiber-context-write-watch
fix(fiber): keep fiber context stacks out of the write watch on macOS
2026-10-27 05:29:29 +01:00
milescovielloandClaude Opus 5.5 d31f194c9c test(agc): keep the DMA data patch checks to valid packets
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 04:24:02 +00:00
Felipebmaitan e44cc5d463 chore: merge current main for AIO review fixes 2026-10-27 01:23:42 -03:00
Yunus Shaikh 30d2ca3492 fix(libScePad): keep presses from before a capture out of the intercepted reads
A press published before the keyboard captured the pad stayed in the
read latch and in the sample queue. The first ReadState after the
handoff returned it beside the Intercepted bit, and Read drained the
queued samples from before the capture unmasked. Clear both when a
sample starts the capture, so every read while it lasts holds only the
Intercepted bit.

Found by MarcZX10's review.
2026-10-27 05:20:10 +01:00
Yunus Shaikh dc209521ed feat(agc): draw the system keyboard over the presented frame 2026-10-27 05:20:10 +01:00
Yunus Shaikh 2a3cd39882 feat(libSceVideoOut): hand the pad to an open keyboard and hold back the game's reads 2026-10-27 05:19:49 +01:00
milescovielloandClaude Opus 5.5 a265527c4d test(libSceFont): cover the terminate code and position a font string records
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 04:19:46 +00:00
Yunus Shaikh 163f88e7fa feat(libSceImeDialog): drive the dialog from the pad
sceImeDialogInit opens the pad keyboard beside the host-text sink and
registers the pad sink and the keyboard view; Finish, Term and
ForceClose release all three. Pad edits go through the same text,
caret and cap as host text: Done copies the text and its terminator
and ends Ok, Cancel ends UserCanceled with the buffer untouched, as
Enter and Escape do. Typed characters end a one-shot shift only when
they fit.

The options follow the dialog's parameters: the multiline option,
the supported languages' currency, the enter label, the extended
parameters' starting page and shift lock (SET_PRIORITY,
PRIORITY_SHIFT), and disable_device, whose controller bit keeps the
pad from editing.
2026-10-27 05:19:41 +01:00
Yunus Shaikh 57d3669f11 feat(libSceIme): route a captured pad to the dialog
An open dialog can now take the pad the way it takes host text: a pad
sink it sets, ImePublishPad_nid_postfix forwarding each pad sample to
it, and ImeCapturesPad_nid_postfix telling the pad's owner that the
dialog has it. A keyboard view provider lets the presentation thread
read the text, caret and key grid it draws. Each is modelled on the
host-text sink: an atomic pointer the dialog sets and clears.
2026-10-27 05:19:41 +01:00
Yunus Shaikh d1d104d67b feat(libSceImeDialog): add the pad keyboard model
A pure model of the controller keyboard: the Latin, Symbols and
Specials pages with their spanned keys, and a step function from pad
samples to edits. It follows shadPS4 30f4170896's on-screen keyboard
(ime_ui_shared.cpp:805-887, ime_dialog_ui.cpp and ime_kb_layout.cpp):

- Cross activates the selected key, armed once Cross is seen up, and
  repeats only the editing keys; the D-pad and left stick move on the
  grid and wrap, a held direction waits half a second at the edge.
- The shortcuts run only when the grid did nothing, in the source's
  order: L2+Triangle symbols, Triangle space (not while L2 is held),
  L3 specials, R2 done, L1+Square clear, Square backspace, L1 and R1
  caret, R3, L2 shift; Circle cancels and loses to Done.
- L2 cycles lower, one-shot upper and caps lock, re-armed once the
  trigger is back at 0.20.
- Repeats use ImGui's default delay and rate, 0.275 s and 0.05 s.

Every button and stick direction held in the first sample is ignored
until it is released, so nothing held when the dialog opens types,
deletes or repeats. The keyboard, menu and R3 mode keys of the source
are left empty, and the currency key and the Done label follow the
dialog's languages and enter label.
2026-10-27 05:19:40 +01:00
Jota 5414390409 test(agc): load the Vulkan loader by its macOS name in the host import and producer gate helpers
The guest memory lifetime tests' host import query and the indirect
arguments pending producer gate opened libvulkan.so.1 on every
non-Windows host, so on macOS they failed with "cannot load Vulkan"
before running. They now open libvulkan.1.dylib there, as the other
driver tests do.
2026-10-27 01:16:35 -03:00
Jota be7db251ad fix(agc): check the deferred destruction resolver only against live devices
The deferred destruction registry kept the first device's
vkGetDeviceProcAddr after that device was destroyed. VulkanDevice
unloads the Vulkan loader with the device, and on macOS the next load
can map it at another address, so every later device in the process
failed with "deferred destruction found two different device
resolvers". The check now applies only while another device is still
registered; the new device's resolver replaces the old one.
2026-10-27 01:15:07 -03:00
milescovielloandClaude Opus 5.5 9c3ad7d55d test(agc): cover the graphics and compute ATOMIC_MEM packets
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 04:13:11 +00:00
milescovielloandClaude Opus 5.5 ed2d385b9a test(agc): cover the REWIND packet and its rewind state patches
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 04:11:22 +00:00
JJenkx bde84e5289 test(agc): skip unsupported sRGB multisample counts 2026-10-27 00:09:24 -04:00
JJenkx c3fd587c23 fix(agc): accept exact sRGB multisample DCC clear endpoints 2026-10-27 00:09:24 -04:00
JJenkx d7afc36cf0 test(agc): cover exact sRGB multisample DCC clears 2026-10-27 00:09:24 -04:00
milescovielloandClaude Opus 5.5 e64d31b0b9 test(agc): cover sceAgcCreateShader's relative pointers, program address patch and registration
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 04:07:04 +00:00
Jota e331f3b8e0 test(agc): give the read-only depth plane flush test a texture detiler
TestReadOnlyStalePlaneFlush flushes a stale depth plane, which creates
the plane's mirror with StorageTexture::Create(context, *context.detiler).
The fixture's context has no detiler, so the reference is bound to a
null pointer, which UBSan reports and stops agc_driver_graphics and
agc_driver_graphics_maps_fallback on. The device always creates its
detiler, so this only happens in the test. Give the test's context a
detiler built over stub entry points.
2026-10-27 00:53:31 -03:00
Adrià b986c11a34 Merge pull request #10543 from maximilianfv/fix/libkernel-macos-append-positioned-writes
fix(libkernel): append positioned writes on an O_APPEND descriptor on macOS
2026-10-27 04:52:27 +01:00
Adrià 5caff281bd Merge pull request #10540 from maximilianfv/fix/agc-macos-build-frame-recorder
fix(agc): build the frame recorder and the resident heap mirror test on macOS
2026-10-27 04:52:21 +01:00
Adrià 742f41d381 Merge pull request #10131 from orezraey/fix/librtc-rfc3339-precise-measured-ps5
fix(libSceRtc): range-check the precise RFC 3339 formatters as measured on a PS5
2026-10-27 04:52:15 +01:00
Adrià 4c486ca322 Merge pull request #10515 from JJenkx/fix/agc-two-sample-dithered-a2c
fix(agc): emulate two-sample DB_ALPHA_TO_MASK 0xe701 dithered alpha-to-coverage
2026-10-27 04:52:02 +01:00
Adrià 60bb466419 Merge pull request #10505 from maximilianfv/fix/libkernel-macos-itimer-terminate
fix(libkernel): reach the guest terminate handler from an ITIMER_REAL expiry on macOS
2026-10-27 04:51:54 +01:00
Dean 5b161a686c Merge pull request #5883 from AnzouBelilita/fix/agc-recorder-pending-write-proof-test
test(agc): account for unknown pending DCC key writes
2026-10-27 16:50:38 +13:00
dantdmdarealguy 36277c4b44 perf(agc): keep recently sampled depth plane copies up to twice the budget
The depth plane copy budget (APS5_DEPTH_PLANE_COPY_MIB, 256 MiB) evicted
the least recently used copy even when it had been sampled in the same
frame. When one frame samples more than the budget, every use evicts a
copy the next use needs, so each copy is made and refilled again on every
use. ASTRO BOT (PPSA21564) samples a 1536x1536x16 D32 copy (288 MiB with
its staging buffer) and a 2048x2048x3 D16 copy (48 MiB) alternately in
its intro and thrashes this way.

A copy sampled in the current or the previous present now stays while
all copies hold at most twice the budget. Past that, the least recently
used copies leave whenever they were sampled, so the copies never hold
more than twice the budget, or the one copy being sampled if it is
larger. Older copies still leave first by least recent use down to the
budget.

DepthPlaneCopyBytes reports the bytes the copies hold, for the tests.
The pooled-memory rounds of agc_driver_depth_plane_guest_layers now
advance two presents between samples, since two copies sampled in one
present may now be kept together.
2026-10-26 22:31:18 -05:00
Filip Michalski 9c5397dc27 perf(shader): reuse starting pixel lane predicates 2026-10-27 04:31:07 +01:00
Dean 09f9a63f6b Merge pull request #11619 from MaxLikesCode/fix/net-recvmsg-iovec-snapshot
fix(libSceNet): receive sceNetRecvmsg through the iovecs it had at entry
2026-10-27 16:26:53 +13:00
thuanquangandClaude 3f130031d8 perf(libc): keep no per-page physical state for resident guest pages on Windows
A resident direct memory mapping created a SharedPage, a Physical, a
physical map node and an aliases buffer for every 16 KiB page, about
18 MiB of heap per GiB mapped, although a page mapped once holds no
state there. Resident pages now keep only their View, with pins and the
compare-when-shared mark in it; an index from (section, offset) to the
resident run finds a live resident mapping of a physical page, and the
shared state is created when a run is demoted, or when it is evicted
with data or a compare mark. ForgetSection drops the index entries of
the section's runs.

guest_memory on Windows 11 26200 (Ryzen 5 5600X): private memory per
GiB mapped at map time drops from 30.9 MiB to 13.4 MiB.

Co-Authored-By: Claude <[email protected]>
2026-10-27 04:24:13 +01:00
al3w0f205 90b10d8b54 test(libSceNet): cover null length pointer and invalid descriptor in socket option calls 2026-10-26 22:17:55 -05:00
milescovielloandClaude Opus 5.5 72801be9fa test(libSceAmpr): check the measured kernel event queue command size against the recorded one
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 03:10:56 +00:00
milescovielloandClaude Opus 5.5 319f275322 test(agc): cover the DMA data patch setters' address words and refusals
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 03:02:39 +00:00
hugodearaujo f4274307ec fix(agc): sample a multisampled 11_11_10 float texture in its sampled format
Since #8898 ResolveTextureFormat gives format 36 (11_11_10 float) its storage form R32_UINT, while a sampled
format 36 image is read through its native B10G11R11_UFLOAT view (SampledTextureFormat). MultisampleTargetTexture
and MultisampleTargetFirstSample still matched the resident target by ResolveTextureFormat, so a 10_11_11 float
color target (B10G11R11_UFLOAT) sampled as a format 36 texture of the same shape was refused.
2026-10-26 23:56:01 -03:00
hugodearaujo 2440eab062 test(agc): read a 4x 10_11_11 float target through a format 36 descriptor 2026-10-26 23:56:01 -03:00
Adrià Franch ba7efbe276 test(shader): keep main's complemented-ballot cases when rebasing the tessellation lowering tests 2026-10-27 03:50:19 +01:00
frankea ca1dfd513f fix(shader): read another control point's output at an immediate address in a hull program 2026-10-27 03:47:44 +01:00