Commit Graph

3838 Commits

Author SHA1 Message Date
boykopovar 0bd2e4cb90 test(relinker): align module tests with nonrecursive discovery 2026-10-10 15:31:17 +03:00
boykopovar 336d481bff fix(relinker): default module path to input elf directory 2026-10-10 14:12:04 +03:00
boykopovar bec6d62b29 feat(relinker): add explicit guest module parent path option 2026-10-10 14:10:13 +03:00
boykopovar 776f7738d4 fix(relinker): stop requiring host dependencies in guest module directories 2026-10-10 14:04:37 +03:00
boykopovar 400a496792 refactor(relinker): unify guest module diagnostics 2026-10-10 14:02:00 +03:00
boykopovar 41126bfa5b fix(relinker): restrict guest module discovery to adjacent directories 2026-10-10 13:59:11 +03:00
Dean Galvin 766370108d fix(libkernel): read random devices in the Windows sceKernelPread
The Windows sceKernelPread stopped going through pread when it learned to
return errors, and with it lost the random device read, so a pread on
/dev/urandom reached ReadFile on a handle that is not a disk and failed
with ESPIPE. Read random devices first, as the Linux path does.

A pread into a read-only guest mapping now returns EFAULT instead of
throwing, matching Linux and the AIO read beside it, so the Windows
guest memory test checks for that return.
2026-10-10 23:26:37 +13:00
Adrià Franch 0c20cab656 perf(agc): render with dynamic rendering when pipelines come from libraries
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 11:45:25 +02:00
Adrià be403084c6
Merge pull request #1141 from nicolasabosch/feat/kernel-pthread-cancel
feat(libkernel): implement thread cancellation
2026-10-10 11:40:09 +02:00
Adrià 663cc42c85
Merge pull request #2636 from adriadam10/feat/gpl-libraries
perf(agc): link graphics pipelines from per-stage libraries
2026-10-10 11:39:12 +02:00
Adrià 6675e60bf1
Merge pull request #2409 from danzaio/feat/rudp-activate
feat(libSceRudp): implement sceRudpActivate
2026-10-10 11:35:58 +02:00
Adrià c84694adbb
Merge pull request #1905 from Raghav314/fix/agc-address-builds-gpu-access
fix(agc): address-based builds map only memory mapped for the GPU
2026-10-10 11:35:38 +02:00
Nicolas Abosch ef9d0dd7d2 chore(libkernel): drop the pthread_cancel comment 2026-10-10 11:32:09 +02:00
Nicolas Abosch 3acca27f27 feat(libkernel): implement thread cancellation
scePthreadCancel and pthread_cancel threw, scePthreadTestcancel did
nothing and the cleanup handler exports did not exist.

A cancel request is now recorded on the thread and acted on at
scePthreadTestcancel, the condition variable waits, scePthreadSem and
sem waits, scePthreadJoin and the sleeps, and under their POSIX names.
A thread blocked in one of the waits is woken; a condition wait takes
its mutex back before the thread exits. The thread exits with
PTHREAD_CANCELED through scePthreadExit, which now runs the handlers
of __pthread_cleanup_push_imp and __pthread_cleanup_pop_imp.
scePthreadSetcancelstate and scePthreadSetcanceltype reject unknown
values, and pthread_setcanceltype is added.

Constants, the handler node layout and the order of events follow
FreeBSD libthr. A sleep is not interrupted, file and socket calls are
not cancellation points and the asynchronous type acts like the
deferred one except at the two set calls (TechnicalDebt). New test:
guest_pthread_cancel.
2026-10-10 11:32:09 +02:00
Adrià 948a526c23
Merge pull request #407 from Pouare514/feat/deathloop-loading
feat(libs): Deathloop loading support (Ampr, NetCtlApDialog + stubs)
2026-10-10 11:29:40 +02:00
Adrià 1052fcc7e6
Merge pull request #2593 from eliasbruno124-dev/fix/agc-bulk-resource-unavailable
fix(libSceAgcDriver): report unavailable bulk resource registration
2026-10-10 11:29:12 +02:00
Adrià aad13ac11b
Merge pull request #1147 from alfalfa-star/perf/agc-staging-pool-heap-budget
perf(agc): size the device staging pool from the device-local heap
2026-10-10 11:28:29 +02:00
Adrià cb6870f965
Merge pull request #2538 from husseinkad/fix/windows-stat-file-identity
fix(libkernel): report a stable file identity from stat and fstat on Windows
2026-10-10 11:26:32 +02:00
Adrià Franch 0a04c8658c perf(agc): link graphics pipelines from per-stage libraries
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 11:25:23 +02:00
Adrià cd73e149b3
Merge pull request #1290 from SirDarky/fix/shader-mac-legacy-denormals
fix(shader): flush v_mac_legacy_f32 denormals as measured on gfx1010
2026-10-10 11:23:53 +02:00
Adrià 3afc78464c
Merge pull request #2543 from overlordxrz-source/feat/libkernel-kill
feat(libkernel): implement kill
2026-10-10 11:21:08 +02:00
Adrià b4a4133c0c
Merge pull request #2530 from hazzardouslysolid/fix/png-truncated-transparency
fix(png): bound transparency chunk detection to the input
2026-10-10 11:20:34 +02:00
Adrià b750211412
Merge pull request #1776 from Celegans12/feat/shader-lds-beyond-device-limit
feat(shader): implement compute LDS beyond the device's shared memory limit
2026-10-10 11:20:13 +02:00
Adrià 309e0675f6
Merge pull request #1415 from TheAggie/fix/agc-sampler-aniso-override
fix(agc): accept the sampler ANISO_OVERRIDE bit
2026-10-10 11:19:53 +02:00
Adrià 1138fa96f4
Merge pull request #2554 from 22alfbassett/fix/kernel-sync-recorded-paths-linux
fix(libkernel): flush only recorded paths in sceKernelSync on Linux
2026-10-10 11:17:59 +02:00
Adrià 95fe14235a
Merge pull request #2536 from orbz22/fix/audioout2-queue-port-buffers
fix(audioout): play every AudioOut2 port buffer set between pushes, one per grain
2026-10-10 11:17:19 +02:00
Adrià 11cb1b75ab
Merge pull request #2397 from NahuelGenchi/fix/libc-posix-memalign-huge
fix(libc): return ENOMEM from posix_memalign for sizes the default heap rejects
2026-10-10 11:15:44 +02:00
Adrià ebe6c180bf
Merge pull request #2594 from morten-holm/pr/macos-clear-pie
fix(relinker): leave MH_PIE clear in the macOS executable
2026-10-10 11:15:15 +02:00
Adrià a0a650884b
Merge pull request #2412 from MathiasDevelopes/feat/libscepsml-module
feat(libScePsml): build libScePsml from the libScePsml_debug source
2026-10-10 11:13:55 +02:00
danzaio d0407a808d feat(libSceRudp): implement sceRudpActivate
Astro's Playroom (PPSA01325) calls sceRudpActivate during start-up, where the throwing stub stopped it. The host has no reliable-UDP stack to activate, so the export returns success and does nothing, matching the OK-returning stubs shadPS4 keeps for the whole library. The guest_offline_imports test now checks the success path with and without sceRudpInit, and still checks that the sceRudpGetStatus sibling throws and writes nothing.
2026-10-10 11:13:46 +02:00
Hussein Kadhim 9b5be73a99 fix(libkernel): keep stat working when a handle has no file identity
Leave the Windows identity fields at their stat values when
GetFileInformationByHandle fails on a handle whose basic information
could be read, instead of failing the whole call.
2026-10-10 11:08:10 +02:00
Hussein Kadhim 0b1941b313 fix(libkernel): report a stable file identity from stat and fstat on Windows
st_ino was always 0 and st_dev differed between stat (drive number) and
fstat (0), so the usual a.st_dev == b.st_dev && a.st_ino == b.st_ino
identity check gave wrong answers. Read the volume serial, the file index
and the link count from the file handle, which works the same for path and
descriptor lookups.

Fixes #2296
2026-10-10 11:08:09 +02:00
overlordxrz-source 9a70477170 feat(libkernel): implement kill
ProsperoStore (PPSA99000) imports kill from libkernel and stops at it on
current main. Its crash reporter resets a crash signal to SIG_DFL and
sends it again with kill(getpid(), signal).

kill follows FreeBSD's kern_kill and killpg1 for the only guest process:
EINVAL for signals outside 0 to 128, signal 0 only checks the target,
and the caller's own pid, 0 and minus its pid deliver through raise.
Any other pid, and -1, which skips the caller, report ESRCH.
2026-10-10 11:06:12 +02:00
raghav314 c11a9cb59f fix(agc): address-based builds map only memory mapped for the GPU
The registry records whether a range was mapped or protected with GPU
access (0x10/0x20), and an address-based build leaves out ranges without
it, as the console's GPU page tables do. The main image is registered
without GPU access; the title's own mprotect with GPU bits adds it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 14:34:34 +05:30
Adrià 3d1a7d90c7
Merge pull request #2619 from oneandonlydean/fix/carry-2525
fix(relinker): skip repeated DT_NEEDED libraries
2026-10-10 11:01:22 +02:00
Adrià 2f3b5046e5
Merge pull request #1492 from Celegans12/feat/agc-dual-source-blending
feat(agc): implement dual-source blending from the MRT1 export
2026-10-10 11:01:16 +02:00
Adrià 4b584d1c37
Merge pull request #2349 from Pipodi/fix/formatted-gpu-buffer-helper
fix(recompiler): emit a GPU-selected formatted buffer access through one shared function
2026-10-10 11:00:10 +02:00
Adrià 412fa8b06f
Merge pull request #1864 from fisherjoey/fix/agc-compute-gate-capture
fix(agc): land cross-queue waits and capture the gated compute group at the gate
2026-10-10 10:57:52 +02:00
Scott Schuster 1a778f7506 fix(agc): decide ANISO_OVERRIDE single-level images from the T#'s own levels
The hardware turns anisotropy off under ANISO_OVERRIDE when the T#'s BASE_LEVEL equals its LAST_LEVEL. The view's level count is taken after LAST_LEVEL is clamped to MAX_MIP, so a T# with BASE 0, LAST 3, MAX_MIP 0 counted as single-level here while the hardware keeps anisotropic filtering for it (measured by @adriadam10 on the hardware oracle). The pairing now reads BASE_LEVEL and LAST_LEVEL from word 3 (DescriptorSingleLevel).

The per-draw path gets a test, agc_driver_image_sample_aniso_override: one ANISO_OVERRIDE sampler shared by two images in a dispatch, with single-level, mipmapped, mixed, and LAST_LEVEL > MAX_MIP descriptors, checking which pairings run (with their samples) and which are refused as mixed. With the old view-based check the LAST_LEVEL > MAX_MIP pairing is refused.

applyAnisoOverride reads the APS5_NO_SAMPLER_CACHE switch through the same cached flag as addImageBinding instead of calling getenv per sampler per draw.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:57:02 +02:00
Scott Schuster 17d9efc290 fix(agc): turn anisotropy off for single-level images under ANISO_OVERRIDE
With ANISO_OVERRIDE the texture unit disables anisotropic filtering when the
sampled view has a single level. Each draw now records, per sampler, whether
its paired images are single-level or mipmapped. A sampler with the bit and an
anisotropic filter whose images are all single-level is bound as the same S#
with point or linear filtering in place of the anisotropic filters, taken from
the sampler cache. One sampler descriptor serves every image paired with it,
so a sampler paired with both kinds in one draw still throws. Samplers of
mipmapped images keep their anisotropy, as on the hardware.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:57:02 +02:00
Scott Schuster d8bb441118 fix(agc): accept the sampler ANISO_OVERRIDE bit
Mesa sets ANISO_OVERRIDE (S# word 2, bit 29) on every GFX10+ sampler
unless aniso_single_level is on; it turns anisotropic filtering off for
single-level views. Samplers carrying it were rejected. Accept and
ignore it: host samplers are built from the S# alone and shared between
images, so single-level views keep the sampler's anisotropy. The gap is
recorded in TechnicalDebt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:57:02 +02:00
Celegans12 7144bb57ee feat(shader): implement compute LDS beyond the device's shared memory limit
Route oversized compute LDS through a per-workgroup storage buffer.
Retain native shared memory for programs that fit the device limit.
Carry the spill stride through prepared shader results and dispatches.
Preserve the stride in the full-result codec and its round-trip fixture.
Keep the Linux RecompileResult size guard aligned with the added field.
Exercise interleaved workgroups and the device-limit boundary.
This topic contains only the LDS change and its reviewer-requested repair.
The base includes upstream's separately merged NaN result correction.
2026-10-10 10:56:56 +02:00
Marcus 683ea37935 fix(shader): flush v_mac_legacy_f32 denormals as measured on gfx1010
VOP2 0x06 measured the same as VOP3 0x140 on gfx1010 (RX 5700 XT) in
wave32 and wave64, IEEE 0 and 1 and f32 denormal modes 0 to 3: the
product is rounded before the add, f32 denormal sources, product and
result are flushed in every mode, and a zero factor gives a +0 product.
It now shares the v_mad_legacy_f32 translation with the accumulator as
the addend, and f32DenormalFlushFor returns 3 for it as well. A new
execution test pins the measured results of its VOP2 and VOP3 forms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:54:23 +02:00
Adrià c9f9e0f139
Merge pull request #2627 from oneandonlydean/fix/carry-2580
fix(agc): defer registered compute shaders without specials to dispatch
2026-10-10 10:53:29 +02:00
Adrià 69e9a2685a
Merge pull request #2605 from elsi06/fix/relinker-self-guest-modules
fix(relinker): reject guest modules in SELF containers
2026-10-10 10:52:52 +02:00
Adrià 695e0b928a
Merge pull request #1551 from MarcZX100/fix/precise-subtick-polls
fix(windows): use precise waits in sub-millisecond polling loops
2026-10-10 10:52:48 +02:00
Adrià 425421276a
Merge pull request #1640 from morten-holm/pr/shader-select-mask
fix(shader): keep s_cselect_b64 of two masks as a lane bit and fold constant masks
2026-10-10 10:51:35 +02:00
Adrià e11c7bef4e
Merge pull request #2623 from oneandonlydean/fix/savedata-cancel-2598
fix(savedata): export sceSaveDataCancel
2026-10-10 10:50:53 +02:00
Adrià 4997f85ad3
Merge pull request #2620 from oneandonlydean/fix/carry-2423
fix(libkernel): return errors from file operation failures
2026-10-10 10:50:33 +02:00
Adrià 68587c34db
Merge pull request #2616 from oneandonlydean/fix/carry-2556
fix: skip zero-length memcpy calls
2026-10-10 10:50:12 +02:00