Commit Graph
14017 Commits
Author SHA1 Message Date
Adrià e0adc075a2 Merge pull request #6697 from karimibrahim07/feat/relinker-named-host-imports
fix(relinker): resolve symbol-name imports through NIDs on Windows
2026-10-19 10:49:05 +02:00
Adrià 1f9e35036e Merge pull request #6685 from DavidSamir/fix/netctl-default-route-macos
fix(libSceNetCtl): read the default route from the routing table on macOS
2026-10-19 10:49:00 +02:00
Adrià 4630318457 Merge pull request #6681 from milescoviello/fix/relinker-bss-page-overlap
fix(relinker): keep a segment's zero-filled tail zero when the next PT_LOAD starts on its page
2026-10-19 10:48:54 +02:00
Adrià d53d0e2d40 Merge pull request #6606 from veosett/codex/indirect-index-prefix
fix(agc): resolve sparse indirect index ranges per record
2026-10-19 10:47:44 +02:00
Z User df0baf9e3e fix(relinker): check the real header ranges when verifying game patches
The guard rejected every patch below the end of the program header
table, which is correct only while the table sits at the start of the
file. Outputs whose table moved into the extra block refused patches
into their first PT_LOAD, so game_patches failed once synthesis added
a header. Overlap is now checked against the ELF header and the table
range itself.
2026-10-19 08:45:59 +00:00
Z User dd1e4b40de fix(relinker): include <cstddef> for std::size_t in ElfConstants.hpp
ProgramLayoutRangeTests.cpp includes this header first, and libc++ does
not provide size_t through <cstdint>, so the macOS relinker jobs failed
to compile the test.
2026-10-19 08:45:59 +00:00
Adrià 52f8222af1 Merge pull request #6670 from MarcZX10/codex/lds-lock-init-race-6666
fix(shader): initialize LDS lock from one invocation
2026-10-19 10:45:39 +02:00
Adrià 5de7c09c37 Merge pull request #6669 from milescoviello/fix/msaa-cmask-codes
fix(agc): read a multisampled target's CMASK by its MSAA codes
2026-10-19 10:44:42 +02:00
Adrià 48f436406b Merge pull request #6663 from karimibrahim07/feat/libkernel-ipv6-v6only
feat(libkernel): set and read IPV6_V6ONLY on a guest socket
2026-10-19 10:44:37 +02:00
Adrià f161098d3b Merge pull request #6563 from notaxeltv/feat/agc-msaa-enable-rect-list
fix(agc): allow MSAA_ENABLE single-sample rect lists
2026-10-19 10:44:32 +02:00
Adrià d937355cb4 Merge pull request #6703 from xXPBSXx/test/rtc-tick-add-units
test(libSceRtc): cover microseconds, minutes, hours and weeks tick addition
2026-10-19 10:43:43 +02:00
Adrià 3c485b889c Merge pull request #6693 from bappisinsane/test/prepare-release-notes
test(tools): cover prepare_release_notes truncation and file output
2026-10-19 10:43:38 +02:00
Adrià fa20f72c7d Merge pull request #6687 from al3w0f205/test/common-dialog-coverage
test(libSceCommonDialog): add guest common dialog test coverage
2026-10-19 10:43:33 +02:00
Josip Parlov 80a53faa3c docs(debt): cite radeonsi for the front half's OC_LDS_EN in shader fusion 2026-10-19 10:40:31 +02:00
Adrià e12c913571 Merge pull request #6650 from WallisSkill/perf/agc-host-alloc-cache
perf(agc): cache freed small blocks per thread on Windows
2026-10-19 10:34:42 +02:00
JJenkx 8bd880ceb1 test(agc): configure depth bounds state runtime environment 2026-10-19 04:34:07 -04:00
JJenkx 4bd0f1d450 fix(agc): preserve infinite depth bounds 2026-10-19 04:33:54 -04:00
David a29f7d0799 docs(relinker): describe --macos-fixed-base 2026-10-19 10:32:50 +02:00
David 3ea53b5412 test(relinker): check the macOS fixed base layout and option parsing
macos_fixed_base relinks the fixed-base fixture with and without
--macos-fixed-base 0x400000 and checks that every segment and section
moves by the same amount, __PAGEZERO ends 64 KiB below the base, the
lowest load page is at the base, the entry offset is unchanged, and the
metadata load bias and the relocated slot hold base-relative addresses.
It also checks the lowest base and the refused options and images.

cli_args covers the parsing, range, repetition and --macos requirement.
2026-10-19 10:32:50 +02:00
Werner 8bd8c1c338 test(libkernel): read through APR while 600 guest streams are open 2026-10-19 10:32:45 +02:00
David 35fe448155 feat(relinker): place macOS executables at a fixed base with --macos-fixed-base
Ruffle (PPSA68091), VLC (PPSA85300) and XPSemu (PPSA97358) read
app0/imports.txt, whose import slot addresses assume the executable's
lowest ELF load page at 0x400000, and dereference them at once. macOS
output always placed that page at 0x140010000, so all three fault on
their first slot read. Linux and Windows have --linux-fixed-base and
--windows-fixed-base for this; macOS had no equivalent.

--macos-fixed-base <address> builds the load image so that the lowest
ELF load page is at the address, as --windows-fixed-base does. The
Mach-O header takes the 64 KiB below it and __PAGEZERO ends there. The
executable is MH_EXECUTE without MH_PIE, so dyld does not slide it. The
address must be 64 KiB aligned, from 0x20000 through 0x7fffffff0000,
and an image ending past the macOS user address space is refused.
2026-10-19 10:32:30 +02:00
David 96e373f8ad refactor(relinker): take the macOS image base from the load image
WriteMacOsImage wrote the Windows ImageBase constant into the Mach-O
segment and section addresses, __PAGEZERO, the metadata load bias, the
TLS descriptors and the init pointer, while the relocations it rebases
were computed from the WindowsLoadImage base. Read the base from the
load image everywhere instead. Every caller still builds its image at
ImageBase, so the output is unchanged.
2026-10-19 10:32:17 +02:00
al3w0f205 58d0d53966 test(libSceGameLiveStreaming): add guest game live streaming test coverage 2026-10-19 10:21:59 +02:00
Josip Parlov c855edec22 docs(env): describe the default host import budget as HostImportBudget computes it 2026-10-19 10:21:18 +02:00
Adrià 3fdd1f52e9 Merge pull request #6668 from DavidSamir/fix/libc-statvfs-path-macos
fix(libSceLibcInternal): read statvfs by path on macOS
2026-10-19 10:19:46 +02:00
Adrià 408455bdac Merge pull request #6667 from DavidSamir/fix/libkernel-sys-macos-posix
fix(libkernel_sys): build and check fchdir search permission on macOS
2026-10-19 10:18:13 +02:00
fdfawef324andCodex 652f86e6d7 test(agc): keep direct argument case off the stopped driver
The direct-device case already drains its own work before returning. Skip the shared singleton wait after its explicit shutdown so the full suite can retain the fallback and counter assertions without throwing ProcessShutdown.

Co-Authored-By: Codex <[email protected]>
2026-10-19 10:18:11 +02:00
f6c8e8474f fix(agc): wait for address-based writers before reading indirect dispatch arguments
A CPU read of DISPATCH_INDIRECT arguments waited only through the flush
hook, which waits for the ranges recorded work noted as pending writes.
An address-based store (FLAT/GLOBAL, or through a descriptor the
recompiler cannot resolve to a static buffer) is not recorded as a
pending write: its batch leases the registered allocations, and only the
guest pin waiter finished that batch. So the thread-dimension,
misaligned and disabled paths, the fill-kernel path and the device's CPU
fallback read the arguments from before an address-based producer ran.
GTA V (PPSA04264) dies loading Story on such a read: a 64-thread clear
kernel read {160, 288, 0xffffffff} as thread dimensions
(3x288x4294967295 groups), bytes its 1-thread setup kernel had not yet
overwritten with {n, 1, 1}, and threw "workgroup count
3x288x4294967295 exceeds device limits".

Every CPU read of dispatch arguments at execution now first finishes the
recorder up to the newest batch recorded with a lease
(Graphics::FinishLeaseWork). The group read-ahead still reads without
waiting; a dispatch it resolved is adopted only when the execution-time
read gives the same counts, and one that differs is dropped and counted
in the [groupcap] line. The device limit error names the argument
address and cpuReason, and the driver adds the queue, path and
read-ahead outcome. The [indirect] read time includes the lease wait,
and the [recorder] sync-site table records the offset of
FinishLeaseWork's caller. The CPU reads that still miss address-based
writes (indirect draw arguments and count, the copy kernel's count
record, the awaits-title checks) are listed in the technical debt.

IndirectArgumentsPendingProducer covers the execution-time CPU argument
reads on compute queues and the pending-label CPU fallback in the Vulkan
device. Its sixth case records a real argument label behind a host Vulkan
event in an earlier batch and an address-based producer in the later open
batch. The event releases only after that producer batch is submitted;
a bounded watchdog releases for cleanup but fails the case. It requires
a deferred producer lease, an unsubmitted producer at the argument
decision, cpuReason 2 and the fresh arguments and counter result. Small
valid stale counts keep a broken-wait control finite on every driver.
Exact CPU-reason and watchdog diagnostics identify the failing path. This
replaces a spinning workload whose earlier label could retire before
the fallback decision on lavapipe, allowing a false green with cpuReason 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Codex <[email protected]>
2026-10-19 10:18:11 +02:00
fogydes 093d6a3d4e fix(libSceAgc): align CB memory semaphore with console oracle and document debt 2026-10-19 13:46:46 +05:30
Adrià 4866297fcf Merge pull request #6305 from fogydes/feat/gameintent-firmware-exports
feat(libSceNpGameIntent): export missing firmware game intent interfaces
2026-10-19 10:16:12 +02:00
Adrià b715404323 Merge pull request #6646 from EagleBearerYS/fix/agc-heap-mirror-replan-unwatched
fix(agc): plan a heap again when its mirror's range has left the write watch
2026-10-19 10:15:31 +02:00
Adrià b95ca1b87d Merge pull request #6648 from NevesHenry/fix/libkernel-open-errno-mapping
fix(libkernel): report ENAMETOOLONG and ELOOP from open, unlink and stat
2026-10-19 10:15:06 +02:00
fogydes 9f0485c4cc fix(libkernel): increase pipe buffer size to match FreeBSD BIG_PIPE_SIZE
On Windows, pipe_nid_postfix configured the anonymous pipe with a 4096-byte buffer. When guest executables redirect standard error to a pipe via dup2 and host logging writes to standard error, the pipe buffer fills during startup before or between guest reader drains, blocking writer threads in ZwWriteFile and deadlocking the title. Increase the Windows pipe buffer capacity to 65536 bytes to match FreeBSD BIG_PIPE_SIZE used by the PS5 kernel, and cover multi-page single-shot pipe writes in guest posix scalar IO tests.
2026-10-19 13:44:41 +05:30
Adrià 5325133b13 Merge pull request #6609 from meh7an/perf/agc-pending-writes-published-union
perf(agc): rule out pending write overlaps from the published union
2026-10-19 10:14:18 +02:00
Adrià 9a5726cc18 Merge pull request #6601 from Amoenus/codex/feat-msaa-sampled-readback
feat(agc): read individual multisample image samples
2026-10-19 10:14:12 +02:00
Adrià 5a3c515753 Merge pull request #6644 from mariuszkreft/fix/shader-ballot-once-per-block
fix(shader): ballot each predicate once per block
2026-10-19 10:14:07 +02:00
Adrià a8c934dc82 Merge pull request #6535 from gguerra26/fix/agc-unused-viewport-depth
fix(agc): normalize unused viewport depth ranges
2026-10-19 10:14:02 +02:00
fogydes 82d93b09a8 test(libSceAgc): drop invalid clientCode rejection check in testMemSemaphore 2026-10-19 13:41:40 +05:30
fogydes dd3798ddeb feat(libSceAgc): implement CB memory semaphore and unversioned payload address 2026-10-19 13:41:40 +05:30
David 2b81cc1c64 docs(debt): say how 16-bit interpolation is computed without Float64 2026-10-19 10:10:34 +02:00
David 8b7ca79869 test(agc): run the mix precision test without Float64
agc_driver_mix_precision skipped on devices without Float64 because
v_fma_mixlo_f16 and v_fma_mixhi_f16 were computed in f64. They now
compile on such devices too, so the test runs everywhere.
2026-10-19 10:10:14 +02:00
David e9af1dc0a6 test(agc): compare 16-bit interpolation with a CPU reference on random rows
The hardware rows cover rounding to nearest even only. The test now
also builds one shader per path that evaluates 2,048 random rows in all
32 modes: the eight float modes with each of the four f16 rounding
modes, which v_fma_mixlo_f16 and v_fma_mixhi_f16 use. The rows draw f16
deltas, f32 coordinates and bases from random bits, random finite
values and special values (zeros, subnormals, the largest finites,
infinities, NaNs), and a third of the bases nearly or exactly cancel the
product. Each result must match a CPU reference built on f64: the exact
product, the sum rounded to odd, one rounding at the target precision
in the mode, and the same overflow, zero and NaN rules.

On devices with Float64 the f64 path is checked against the same
reference.
2026-10-19 10:10:14 +02:00
David b8a5c1a91a test(agc): check integer interpolation against the hardware rows
agc_driver_interpolation_modes skipped on devices without Float64. It
now runs its 32 rows measured on RDNA2, for the three 16-bit
interpolation instructions in all eight float modes, through the integer
path on every device, and through the f64 path as well where the device
has Float64. The shader for one row set is built for either path, and
reports which path a mismatch came from.
2026-10-19 10:10:14 +02:00
David a3cfc8c461 fix(shader): interpolate 16-bit values with 64-bit integers on devices without Float64
v_interp_p1ll_f16, v_interp_p1lv_f16 and v_interp_p2_f16 round the exact
P10 * I + P0 once to f32 and P20 * J + S2 once to f16 (#697), and
v_fma_mixlo_f16 and v_fma_mixhi_f16 reuse the f16 step in every f16
rounding mode. The exact sum was computed in f64, so on a device without
Float64 every shader using them failed to compile:

  64-bit float instructions need the Float64 capability, which the
  device lacks

Apple GPUs have no f64; with MoltenVK 1.4.2 on Apple M2 this stops
ProsperoStore (PPSA99000), PokeMMO Prospero (PPSA98001), Regie5
(PPSA99520) and PS5 OpenGL Showcase (PPSA99005) at their first such
pixel shader.

Without Float64 these operations are now computed in 64-bit integers,
which the shader device profile already requires. The inputs are
flushed as before and decoded to integer significands. The 24 by 24 bit
product is exact in 64 bits. Both terms are normalized to bit 62, the
smaller one is shifted down with the bits it loses kept as a sticky bit,
and the exact sum is rounded once to f32 to nearest even, or to f16 in
the f16 rounding mode, with f32 and f16 subnormal steps. Overflow,
signed zeros, the round-down zero sign, NaN quieting and the order in
which NaN operands win follow the f64 path, without its f64 arithmetic.
The module then declares Int64 instead of Float64. Devices with Float64
keep the f64 path.
2026-10-19 10:10:13 +02:00
David ebe42cf3fa refactor(shader): record 16-bit interpolation apart from other f64 requirements
FPInterpolateF32 and FPInterpolateF16, which v_interp_p1ll_f16,
v_interp_p1lv_f16, v_interp_p2_f16, v_fma_mixlo_f16 and v_fma_mixhi_f16
translate to, set the same float64 requirement as the f64 instructions,
since their exact sums are computed in f64. They now set
float64Interpolation instead, and the module still declares Float64,
and still throws without it, for either requirement. Nothing changes in
the emitted SPIR-V; the next commit gives these two operations a path
for devices without Float64.
2026-10-19 10:10:07 +02:00
ionut27001 e801dcd9e9 fix(agc): let a kept descriptor set's table record hold its textures weakly
A freed dedicated set kept for reuse recorded every texture of the resources that freed it and kept
them alive, so the kept handles could not be reused while the set referred to them. Up to eight kept
sets held textures the caches had already evicted: their memory stayed in use outside the caches'
budgets, and a title with large image tables ran out of device memory.

The record now holds the textures weakly. A build compares the kept table's views only while every
recorded texture is still alive, so a matching handle is still the same view; when one has died the
table is written in full, as for any other change.
2026-10-19 11:09:56 +03:00
Adrià 6030b31e06 Merge pull request #6758 from LeandroLP23/docs/debt-closes-when
docs(debt): let an entry name what would close it with Closes when
2026-10-19 10:09:16 +02:00
Adrià f71a311935 Merge pull request #6756 from LeandroLP23/docs/debt-entry-states-the-gap
docs(contributing): state the gap first in a debt entry and remove it once closed
2026-10-19 10:08:30 +02:00
Dean Galvin a53c89fee8 Merge main into pr-6730 via the rebased #6457
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
#	docs/dev/debt/libSceAgcDriver.md
2026-10-19 21:02:18 +13:00
Dean Galvin 2e329d1179 Merge main into pr-6479 via the rebased #6457
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
#	docs/dev/debt/libSceAgcDriver.md
2026-10-19 21:02:08 +13:00