Commit Graph
12196 Commits
Author SHA1 Message Date
Adrià b6403ddd6d Merge pull request #6176 from mitul72/perf/shader-integer-folding
perf(shader): fold integer compares by value sets and known bits
2026-10-18 23:26:59 +02:00
Adrià 946e9d936b Merge pull request #6212 from milescoviello/fix/agc-inverted-scissor
fix(agc): treat an inverted scissor rectangle as empty
2026-10-18 23:26:54 +02:00
Adrià 1158cb8aab Merge pull request #6255 from LeandroLP23/fix/agc-kill-demoted-quad-pixels
fix(shader): kill demoted quad-mask pixels when the pixel program returns
2026-10-18 23:26:48 +02:00
Adrià 8256d3a1f3 Merge pull request #6134 from fdfawef324/claude/agc-prepare-dump-name
fix(agc): name preparation-failure shader dumps apart from dispatch captures
2026-10-18 23:26:43 +02:00
Adrià c7f67e5cf3 Merge pull request #6144 from freshstart2066-create/feat/libc-safe-wide-strings
feat(libc): implement safe wide string and concatenation functions
2026-10-18 23:26:38 +02:00
thibautandClaude Opus 5.5 3e5499310c fix(shader): round normalized storage image writes to nearest even
Vulkan lets a device return either neighbour when it converts a float to a
normalized texel, and devices differ: for a product of 123.50003, NVIDIA and
Intel both store 123, and on GTA V's FSR1 RCAS compute pass the two vendors
stored different bytes for the same inputs.

Writes to unorm and snorm storage images whose components share one width
now clamp the value (NaN to 0), round value * scale to nearest even in the
shader and store level * c, where c is the smallest float not below
1 / scale. The exact product of that float with the scale lies in
[level, level + 0.01) for 8-, 10- and 16-bit unorm and snorm, so a device
that rounds to nearest and one that truncates both store the level. The
format comes from the image descriptor through specialization constants
(StoreQuantizeBase, four per written storage image), so other formats keep
the plain write.

Test: agc_driver_image_store_unorm_rounding stores values next to the
midpoints between levels, edge values and NaN/infinities to 8_UNORM,
16_16_UNORM, 8_8_8_8_UNORM, 8_8_8_8_SNORM and 16_16_16_16_UNORM images; it
fails on main on an RTX 4090 and on an Intel UHD 770 and passes on both with
this change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XBXM4pgkMHYEtqN1EQni2P
2026-10-18 23:22:45 +02:00
valenciana-nc 84d77798c2 fix(libkernel_sys): reject root names in symlink targets and test target restrictions
Replace the leading-slash absolute-target check with a root-name/root-directory
check so Windows targets like C:/ or \\server\share are rejected too, and
add guest tests covering rejected (.. , ../x, a/../b, a/../../x, /abs, plus
C:/ and UNC paths on Windows) and accepted (sub/dir, a..b, ...) targets.
2026-10-18 21:21:40 +00:00
thuanquangandClaude Opus 5.5 e0da1fb1c9 test(libkernel): time blocking waits from before the writer thread starts
PipeRead (guest_kqueue) and the blocking read in guest_socket_events took
their start time after creating the thread that writes after 50 ms, so a
main thread preempted between the two measured less than the writer's
sleep and failed the 40 ms check although the wait did block until the
write.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 04:18:05 +07:00
mitul72 ba4571a253 fix(agc): name in-place draw inputs and multisampled targets in pass hazards
A recorded draw's pass access listed its shader-resource reads, indirect
arguments, storage images and resident color targets, but not the index
and vertex ranges it binds in place from host imports
(DrawInputs::inPlaceReads) nor its multisampled color targets (null in
RecordedDraw::targets). A later draw writing those ranges through a
shader buffer, or a pass sharing the multisampled target under another
pass key, found no hazard: the break between the passes recorded no
barrier, or the later draw continued the pass, so its writes could land
before the earlier draw fetched its inputs, and the two passes' attachment
writes and store operations on the multisampled image were unordered.

The in-place input ranges join the pass reads, and MultisampleTargetView
reports the target's image, which joins the pass attachments as written.
2026-10-18 23:14:36 +02:00
Adrià 0d1c299a91 Merge pull request #6277 from hypermoist/fix/window-lane-spills
fix(recompiler): read lane spills back through relative-addressing window registers
2026-10-18 23:14:35 +02:00
Adrià 2da2284def Merge pull request #6270 from YossiYad/fix/agc-register-defaults-pairs
fix(libSceAgc): return the console's register-defaults table and type pairs
2026-10-18 23:14:29 +02:00
Dean bd7cd1be18 Merge pull request #7500 from AlxcBTW/pr/input-analog-keys
feat(libScePad): analog keyboard input with a stick modifier and stick and trigger ramps
2026-10-19 10:10:26 +13:00
Dean e1248700d9 Merge pull request #7646 from oneandonlydean/revert/6112
revert(relinker): run guest preinit arrays before the module initializer (#6112)
2026-10-19 10:10:20 +13:00
valenciana-nc 7408e55478 fix(libkernel_sys): reject parent-directory components in symlink targets
symlink_nid_postfix blocked absolute targets but accepted relative
targets containing '..' unchecked. The target is stored verbatim and the
host OS follows it when the link is later opened through the guest path
resolver, so symlink("../../../../..", "e") followed by
sceKernelOpen("e/etc/passwd", ...) reads host files outside the guest
root. Reject any '..' component, mirroring the absolute-target handling
above it.
2026-10-18 21:09:38 +00:00
Mehran 9824c46fe0 feat(libs): let relinked Windows games opt into mimalloc 2026-10-19 00:08:47 +03:00
Adrià 2d7619cf99 Merge pull request #6258 from erm14254/fix/shader-ordered-count-wave64
fix(shader): add the ordered count of a first active lane in the upper wave64 half
2026-10-18 23:08:08 +02:00
MarcZX100 2d2c21a04b test(agc): skip unavailable shadow checks 2026-10-18 21:06:07 +00:00
Adrià 967f0b95c5 Merge pull request #6210 from TheAggie/perf/agc-present-epoch
perf(agc): the presenter takes the newest collect epoch, so an untracked display image keeps its comparison memo
2026-10-18 23:00:51 +02:00
Adrià 3a14fdb321 Merge pull request #6241 from Ondra97/codex/fix-semaphore-canceled-wakeup
fix(libkernel): preserve semaphore wakeups across cancellation
2026-10-18 22:59:45 +02:00
David 9f4cd87a61 Merge remote-tracking branch 'origin/main' into fix/netctl-default-route-macos
# Conflicts:
#	core/libs/tests/GuestNetCtl.cpp
2026-10-19 00:56:11 +04:00
Adrià ff2fc57153 Merge pull request #6248 from mugurc/feat/libscesystemservice-loadexec-macos
feat(libSceSystemService): LoadExec on macOS hosts
2026-10-18 22:50:27 +02:00
Adrià c7e28608b1 Merge pull request #6232 from ANONYMOUSZED-beep/feat/image-table-pointer-chains
feat(shader): follow pointer chains from image-table records to the T#
2026-10-18 22:50:22 +02:00
Savvanis SpyrosandClaude Opus 5.5 45a2e3dd4a fix(relinker): resume scans after undecodable bytes between PS4 unwind functions
In PS4 executables and modules the bytes between unwind functions are
16-byte slots of function tails and padding, and a tail can begin inside
an instruction, such as a lone REX byte before a 15-byte NOP. The
syscall and call-site scans decode the executable segment linearly, so
such a slot failed the relink with "Cannot decode instruction".

For images with a PT_SCE_DYNLIBDATA segment the scans now receive the
unwind function ranges. Outside every range an undecodable byte is
skipped and decoding resumes at the next byte, and a decoding that would
cross into a range ends at its start, so gap bytes cannot change how a
function is decoded. Inside a range a decode failure still fails the
relink, and images without unwind ranges are scanned as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 23:45:49 +03:00
Adrià Franch 24bc68375d fix(agc): refuse storage access to a Z texture whose HTILE was partially filled 2026-10-18 22:44:21 +02:00
m.peau 69afb0569f fix(agc): sample undrawn multisampled Z and D 64 KiB swizzle textures, and Z ones whose HTILE is cleared 2026-10-18 22:44:13 +02:00
thuanquangandClaude Opus 5.5 2c75b6c5b2 test(libkernel): give the positioned close test a real 300 us head start
With WinLibs, std::this_thread::sleep_for under 1 ms returns at once, so
close raced the reader in every round and a run where all 60 rounds lost
the race aborted. The test now waits with PreciseSleepUs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 03:41:16 +07:00
Dean Galvin c3b9001592 revert(relinker): run guest preinit arrays before the module initializer (#6112)
This reverts commit 376c040294.
2026-10-19 09:38:31 +13:00
Adrià 6e27fc8f07 Merge pull request #6233 from milescoviello/fix/spawn-missing-program
fix(libSceLibcInternal): fail posix_spawn with ENOENT when the program is not there
2026-10-18 22:37:14 +02:00
Adrià 1288433e8e Merge pull request #6184 from MarcZX10/codex/cache-inaccessible-guest-pages-6183
fix(agc): cache inaccessible guest pages
2026-10-18 22:37:09 +02:00
Yunus Shaikh 340f3aa13a Merge main into fix/agc-sample-location-grid-exact
Resolves MultisampleTarget against #6635: the sampled view takes the requested view type and keeps the sampled-only usage when the target has a storage view for the guest's sample order.
2026-10-18 13:37:01 -07:00
Dean e8ad642fe6 Merge pull request #6620 from hamb3r/perf/precise-sleep-until-qpc-fastpath
perf(libc): add steady_clock fast path in PreciseSleepUntil
2026-10-19 09:32:22 +13:00
Dean ca1c4c89cd Merge pull request #6635 from hamb3r/fix/shader-msaa-array-descriptor-shape
fix(shader,agc): support multisampled 2D array descriptor image shape and runtime views
2026-10-19 09:32:18 +13:00
milescovielloandClaude Opus 5.5 388527d6b2 fix(agc): reimport a multisampled target recreated with another pipe-bank XOR
RADV gives each image its own pipe-bank XOR when it creates it. When Ruffle
recreates a 4x render target on the same memory, the next draw names the
same surface, DCC and CMASK with another XOR, and the resident target refused
it as a changed layout ("multisampled DCC target layout or metadata
changed"). A use that differs from a resident DCC target only in that XOR now
keeps the target's image, views and cached textures, takes the new layout,
and reimports its contents from the current DCC and CMASK metadata the way a
first use does, clearing the image to that color after the work already
recorded against it. Any other layout change is still refused.

Reusing the image keeps memory flat: Ruffle's cache_as_bitmap__avm2_button
recreates its 864x864 4x target 28 times in 32 s.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 20:29:54 +00:00
Adrià ae4d901a57 Merge pull request #6179 from milescoviello/perf/verify-read-probe
perf(agc): answer small guest read checks without /proc/self/maps
2026-10-18 22:27:37 +02:00
AlxcBTW f0ec9bd2a0 Merge remote-tracking branch 'origin/main' into pr/input-analog-keys 2026-10-18 22:27:23 +02:00
Faryan Rezagholi d2e0624764 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 2026-10-18 22:26:59 +02:00
Faryan Rezagholi cdccc34523 feat(libkernel): log guest exception context 2026-10-18 22:26:45 +02:00
Yunus Shaikh 363e8d9472 Merge main into fix/agc-lookup-log-fits-build 2026-10-18 13:26:18 -07:00
billythemenace2andClaude Opus 5.5 2e363d375a fix(libkernel): redirect a raise only once the target leaves host code
On Windows, sceKernelRaiseException suspends the target and redirects it to
the guest handler wherever it stopped, except inside NtContinue or
winpthreads. A target stopped inside host code (a C runtime call, a host
library) can hold a host lock there; a handler that then waits, as a
collector's thread-stop handler does, keeps it held, and every host thread
that needs the lock stops with it. SONIC SUPERSTARS stopped at frame 65 this
way: its "UDS" thread was redirected inside the stderr write of a trophy
message and parked in sceKernelWaitEventFlag holding the stream lock, and the
driver's logging threads blocked on it.

A target running code of a module other than the executable or a guest
module is now resumed and suspended again until it is back in guest code,
for up to the existing retry limit; a target blocked in an ntdll wait is
still redirected there, as before.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-18 21:24:44 +01:00
BIGFERRY999 f7dce6e2d4 feat(libc): implement copysign and copysignf 2026-10-18 22:23:40 +02:00
Dean d17f456eac Merge pull request #7515 from AlxcBTW/pr/profile-windows
fix(agc): print the revalidate profile per 10 s window and label the cumulative profile lines
2026-10-19 09:22:28 +13:00
Dean a6cdf1e4b2 Merge pull request #7391 from AlxcBTW/test/depth-clear-isolation
test(agc): isolate the depth clear cases per recorder and cover plane fills against a UAV clear
2026-10-19 09:22:24 +13:00
Dean effb7d2d5a Merge pull request #7498 from AlxcBTW/pr/input-slow-mice
fix(libScePad): smooth a slow-reporting mouse over its measured report interval
2026-10-19 09:22:19 +13:00
Dean ce396a5d41 Merge pull request #7497 from AlxcBTW/pr/input-default-l2
feat(libScePad): bind L2 to R and the first mouse side button
2026-10-19 09:22:11 +13:00
Dean 7012f70023 Merge pull request #6691 from xXPBSXx/test/netctl-result-natinfo-statev6
test(libSceNetCtl): cover GetStateV6, GetResult and GetNatInfo in guest_net_ctl
2026-10-19 09:22:02 +13:00
Dean 65b0ad288b Merge pull request #7496 from AlxcBTW/pr/input-capture-hotkey
feat(libScePad): toggle mouse capture with F7 beside the middle button
2026-10-19 09:21:58 +13:00
Adrià fb9a1eb8f3 Merge pull request #6178 from MarcZX10/codex/release-undrawn-resource-plans-6139
perf(agc): release unused registered shader resource plans
2026-10-18 22:20:27 +02:00
Adrià ccf0f58785 Merge pull request #6228 from Ondra97/codex/fix-windows-directory-renames
fix(libkernel): preserve directory identity across Windows renames
2026-10-18 22:20:22 +02:00
Josip Parlov b4cb4f8dbd test(agc): cover storage write-backs retiled straight into unit-shadow slabs
The write-back padding test gains an unpadded surface, a padded one and
one that spans two slabs, writes each of them back twice and checks the
stored texels and the untouched bytes after each write-back. The storage
refresh, write-back padding and single-pass tests run as
agc_storage_write_back.
2026-10-18 22:18:45 +02:00
Josip Parlov a8060b40eb perf(agc): retile storage write-back windows straight into their unit-shadow slabs
writeBackWindows retiled every window into a device scratch buffer and
then copied the kept bytes from the scratch into the unit-shadow slabs,
so each stored byte was written twice.

A window now retiles straight into its slabs, one dispatch per slab
piece, when its kept range is its whole tiled range, every piece goes to
a slab that needs no seed, the pieces are tile-block and 4-byte aligned,
and it is not a tail, thick or saved slice. The bytes no element covers
are copied into the slab from their current source before the retile,
or left alone when the slab already holds them. Every other window keeps
the scratch path, and the scratch is not allocated when no window needs it.
2026-10-18 22:18:45 +02:00