Commit Graph
14017 Commits
Author SHA1 Message Date
hamb3r b155e1d0eb test(shader,agc): cover Image2DMultisampleArray descriptor binding and dimension check 2026-10-16 02:51:04 +03:00
hamb3r 90896ff0ce fix(agc): handle Image2DMultisampleArray in GuestTextureResource 2026-10-16 02:45:36 +03:00
hamb3r b88f97ae41 fix(shader): map multisampled array images in DescriptorBindingBuilder 2026-10-16 02:45:12 +03:00
hamb3r 893b48208a feat(shader): add Image2DMultisampleArray to DescriptorImageShape 2026-10-16 02:44:55 +03:00
Eli Yarson d70e9fb6c8 test(libc): skip the failed heap commit check when the host overcommits 2026-10-15 20:30:18 -03:00
hamb3r 78ce0b8361 test(libc): cover zero-epoch and coarse steady_clock deadlines in PreciseWait 2026-10-16 02:13:39 +03:00
hamb3r c07d26ea34 perf(libc): add POSIX steady_clock fast path in PreciseSleepUntil 2026-10-16 02:13:14 +03:00
hamb3r 56ce6a5079 perf(libc): add Windows 10 MHz steady_clock fast path in PreciseSleepUntil 2026-10-16 02:12:42 +03:00
hamb3r b4bc6ebc3e refactor(libc): extract PreciseQpcFrequency helper in PreciseWait 2026-10-16 02:12:11 +03:00
Hashaam ZafarandClaude Opus 5.5 75f5beffa0 fix(agc): present EOP flips when draws are pipelined
With the queue-0 draw pipeline on, the default since #1202, the packet
loop hands every label-writing packet to the pipeline and skips the rest
of the loop. A RELEASE_MEM that completes a reserved EOP flip
(sceVideoOutSubmitEopFlip, #5539) is a label write, so its label landed
but the flip branch never ran: the reservation was consumed and the flip
never presented. video_out_flip_eop and video_out_flip_eop_main failed
and video_out_flip_eop_aftergpu timed out.

Keep packets that carry a reserved flip out of the pipeline. They take
the normal path, which drains the pipeline before the flip as it does
for flip packets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 16:07:18 -07:00
Get-fix a9fa0e8b08 fix(relinker): ignore unwind records that cover no code
An FDE whose address range is 0 describes no instructions, and an
unwinder never matches a pc in it. The exception-table reader rejected
it with "inconsistent FDE function range", which stopped the
conversion of Limbo (CUSA01664): one of its 17328 FDEs covers 0 bytes
at 0x47dd0, where the next record starts. Such a record is now read
and left out of the function list.
2026-10-16 02:05:40 +03:00
MarcZX100 0627bc6bde fix(agc): free released lavapipe descriptor sets 2026-10-15 23:02:19 +00:00
Yunus Shaikh 661d3cba8d test(agc): defer the stage of a pipeline ABI whose geometry state does not decode
A fifth ABI deferral mode, abi_deferred_undecodable_state. A vertex
shader whose specials route it through geometry (VGT_SHADER_STAGES_EN
0x2030), which registration leaves alone, is resolved through
ResolveGraphicsStagesAbi with the context and primitive registers that
sceAgcCreatePrimState passes for it. DecodeShaderStages refuses its
VGT_GS_OUT_PRIM_TYPE of 1.

The call must not throw and must log the stage once with the decode's
reason, and a second call must neither prepare nor log it again. A draw
that routes the stage through the vertex path then prepares it at its
first use without reporting it as missing a registration artifact.
2026-10-15 22:47:49 +00:00
GalaxyGamingFRandClaude Opus 5.5 78ede8c3b9 fix(relinker): keep imports reached by indexing a live table base
A lea of a table base recorded only the exact base address as address-taken, so import slots after it in a function-pointer or vtable table were treated as dead. unused-filter=2 then stripped those NIDs and indexed calls hit unbound slots. The base walk now marks every consecutive import slot or relocated pointer starting at the base.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 15:31:22 -07:00
Kovalev Vladislav 925f9a84b0 fix(agc): resolve sparse indirect index ranges per record 2026-10-16 04:27:23 +06:00
Kovalev Vladislav ee49195b4e test(agc): reproduce sparse indirect index ranges 2026-10-16 04:27:23 +06:00
Yuri Olive b27e4c9710 feat(libScePad): export missing firmware pad interfaces 2026-10-15 19:24:39 -03:00
MarcZX100andAdam Franke 083f1cc9d8 test(libkernel): drop backup privileges in denied parent watch
An elevated Windows process can bypass the parent directory DACL while holding SeBackupPrivilege or SeRestorePrivilege. Remove both privileges before DeniedParentWatch so the test exercises the denied-open path reliably.

Co-Authored-By: Adam Franke <[email protected]>
2026-10-15 22:24:04 +00:00
Yunus Shaikh 6bd8647c27 fix(agc): leave the stages of a pipeline ABI whose state does not decode to their first use
A title's graphics pipeline ABI call decodes the stage routing and programs
from the registered state and the call's own context and primitive
registers. When that decode refused the state, the exception left the
call and ended the title, although the draws that later use the stages
decode their own state.

The decode failure now defers every stage of the call the same way a
stage whose preparation fails is deferred: each is prepared when a draw
uses it.
2026-10-15 15:22:38 -07:00
Yunus Shaikh fae2221c47 Merge #6537's head into perf/shader-image-table-reuse-v3-pr
Keeps each set's image table writes in its own draw snapshot set, which 007 First Light reaches with this branch.
2026-10-15 15:17:15 -07:00
Mehran 5234ab2f4a perf(agc): rule out pending write overlaps from the published union 2026-10-16 01:11:18 +03:00
Yunus Shaikh 0ba4f056cd fix(agc): stop and join the compare helpers and the pipeline library worker at shutdown
Two more detached driver threads were never stopped: the helpers of the
parallel compare pool, started at the first large compare, and the
pipeline library's job thread, started at the first link-time optimized
pipeline. A process that exited right after starting them killed them
inside the first waits that take winpthreads' global condition-variable
lock, as with the preparation workers.

The driver's shutdown now stops both and joins them, after the device
is reset. A compare in progress finishes first and later compares run
on the caller. The library worker finishes the job it is running, the
jobs still queued are dropped and counted off their device, and later
pipelines are not optimized in the background.
2026-10-15 15:09:33 -07:00
Yunus Shaikh afb1d0aad8 fix(agc): join the shader preparation workers when their pool closes
Closing a preparation pool waited until its queue was empty, but its
detached workers stayed parked on the queue until ExitProcess killed
them. A pool first used shortly before shutdown still had workers
starting at exit, inside the first waits that take winpthreads' global
condition-variable lock, which the next DLL-detach destructor of an
unwaited static condition variable then waits for forever.

The workers are now joinable and leave once their pool is closed and
idle, and Close joins them, so after the driver's shutdown no
preparation worker is running or starting.
2026-10-15 15:05:12 -07:00
Yunus Shaikh 0365a367f9 fix(agc): close only the shader preparation pools that exist at shutdown
CloseRegistrationPreparation took RegistrationPreparePool::Instance(),
which creates the pool and starts its detached workers (half the
hardware threads, at least two) when nothing was queued for preparation
yet. In a process that prepared nothing in the background, the driver's
shutdown started the workers only to close the pool, and the process
exited while they were still starting. Their first waits take the
global lock of winpthreads' statically initialized condition variables;
ExitProcess killed them holding it, and the destructor of the next
static condition variable that was never waited on spun on it forever
at DLL detach (~DeviceUseGate in ~Driver, or one of libkernel's). On
GitHub's Windows runners agc_interpolant_mapping hung that way in 15 of
60 rounds of eight test runs.

Shutdown now closes only the pools that exist, and a pool first used
after it starts no workers, so later preparations run on the caller as
they did on a closed pool.
2026-10-15 15:04:17 -07:00
Adrià 5d9dcc42d2 Merge pull request #6372 from AlxcBTW/perf/pipeline-cache-once
perf(agc): load the pipeline cache file only on the windowed device and save without re-reading an unchanged file
2026-10-15 23:58:29 +02:00
Adrià 7b20318e89 Merge pull request #5882 from billythemenace2/fix/agc-msaa-target-without-msaa-enable
fix(agc): rasterize a multisampled target without MSAA_ENABLE at the pixel center
2026-10-15 23:58:24 +02:00
Yuri Olive 783da344a7 docs(libSceRtc): list sceRtcInit and sceRtcEnd as silent stubs 2026-10-15 18:56:38 -03:00
Felipe Arce 46d49131e7 feat(libkernel): support EVFILT_READ on the read end of a pipe
kevent threw for any descriptor that is not a guest socket. The read end
of a pipe now gets the descriptor knote, following FreeBSD 11's
filt_piperead: data is the number of buffered bytes and EV_EOF is set
once the write end is closed. GuestSockets::Ready falls back to the new
PipeReadState for a descriptor that is not a socket, and WaitAny waits on
the pipe with ppoll on Linux or in 1 ms WSAPoll slices on Windows, only
when the queue holds a pipe. On Windows the equeue waker now starts
Winsock itself, since a queue can wait on a pipe before any socket exists.
2026-10-15 21:56:19 +00:00
Yuri Olive 51e9e5e825 feat(libSceRtc): implement the remaining firmware exports 2026-10-15 18:54:39 -03:00
MarcZX100andSuperCatElvis f25f22630e fix(relinker): exclude trailing PS4 relative jump tables
Co-authored-by: SuperCatElvis <[email protected]>
2026-10-15 21:54:18 +00:00
Karim Ibrahim 411dc0748f feat(libkernel): set and read IPV6_V6ONLY on a guest socket 2026-10-15 17:48:41 -04:00
MarcZX100 881facc4fa fix(agc): refuse native MSAA index buffer reads 2026-10-15 21:35:59 +00:00
Ondra97 97730a3764 fix(json2): release partial copies on allocation failure 2026-10-15 23:30:25 +02:00
Hashaam ZafarandClaude Opus 5.5 42191c0807 test(libc): keep intentional aborts away from the system crash handler
guest_host_standard_error and exception_runtime fork children that end in
SIGABRT on purpose. When kernel.core_pattern pipes cores to a handler, as
Ubuntu's apport and systemd-coredump do, the kernel starts it for every
dumpable crash even with RLIMIT_CORE at 0. apport takes about 1.1 s per
crash here, so guest_host_standard_error spent 2.3 s waiting and timed out
at its 10 s limit under parallel ctest load. Marking those children
non-dumpable on Linux skips the handler: 2.29 s to 0.01 s and
1.17 s to 0.01 s, with the same SIGABRT and message checks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 14:26:53 -07:00
xXPBSXxandClaude Sonnet 5.5 21ff40a95c docs(input): list the default keyboard and mouse bindings
INPUT_MAPPING.md names the actions and says that omitted actions keep their built-in bindings, but not what those bindings are. The table is read from InputMapping in core/libs/prx/libScePad/include/InputMapping.hpp.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-15 23:25:54 +02:00
Mouad-Scriptz-0andClaude Sonnet 5.5 2e86b69fb7 feat(libc): export std::setw(int)
Dinkumware's setw returns a manipulator holding a function pointer and the
width, which the caller applies to the stream; the function stores the
width in the stream's ios_base. The export returns that pair in RAX:RDX and
the function writes ios_base::width, leaving flags and precision alone.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-15 21:20:48 +00:00
Adrià 31cbb55d75 Merge pull request #5880 from ErenYeager1836/test/cpu-temperature-probe-coverage
test(libkernel): cover valid probe in cpu temperature guest test
2026-10-15 23:15:48 +02:00
Adrià be4a6f0a82 Merge pull request #5878 from ErenYeager1836/test/operation-mode-and-trinity
test(libkernel): cover sceKernelIsTrinityMode and dual-null in operation mode guest test
2026-10-15 23:15:43 +02:00
Adrià f35c13fc95 Merge pull request #5833 from Ondra97/codex/fix-windows-vector-io-lock
fix(libkernel): serialize Windows vectored file transfers
2026-10-15 23:15:38 +02:00
Adrià 827c62a3fb Merge pull request #5874 from ErenYeager1836/test/error-dialog-coverage
test(libSceErrorDialog): cover initial status queries and uninitialized close in guest test
2026-10-15 23:15:33 +02:00
Adrià 65262da1e0 Merge pull request #5856 from ErenYeager1836/fix/ime-keyboard-duplicate-open-error
fix(libSceIme): return error codes instead of throwing on duplicate open or close
2026-10-15 23:15:29 +02:00
David 2854da23aa fix(libc): keep the _Cnd_timedwait deadline in the host clock's unit
The deadline was built as seconds plus nanoseconds, a nanosecond duration,
and converted implicitly to a system_clock time point. Where system_clock
counts microseconds, as on macOS, that conversion is lossy and does not
compile, so libc did not build there.

The seconds now stay in the clock's unit and only the nanoseconds are
rounded up to it, so the wait never ends before the requested time. With
a nanosecond system_clock nothing changes. Converting the nanosecond sum
instead would compile but overflow above 2^63 nanoseconds, which the
clock range check above allows on macOS: a 10^10 second deadline then
wraps into the past and the wait times out at once.
2026-10-16 01:13:56 +04:00
David 266e8de2cc test(libc): wait on a _Cnd_timedwait deadline beyond the nanosecond range
A deadline of 10^10 seconds does not fit a nanosecond count but fits the
host clock where system_clock counts microseconds, as on macOS. There the
wait must block until it is woken; where the clock cannot hold the
deadline, _Cnd_timedwait must throw the overflow error as for any other
deadline past the clock's range.
2026-10-16 01:13:56 +04:00
Yunus Shaikh ac9ccfb89c fix(agc): keep the host import budget off the device report until an import fails
The host heap's VK_EXT_memory_budget report lowered a set
APS5_HOST_IMPORT_MIB of 6400 MiB to 4480 MiB on Resident Evil Village
(PPSA01556), where 6400 MiB runs without a vkAllocateMemory failure, and
85,047 imports were refused. A set APS5_HOST_IMPORT_MIB is now never
lowered by the report, and the default is held to the report only once
an import's vkAllocateMemory has failed. The failure ceiling is
unchanged. The first time the report would lower the budget, a [gpu]
host import budget line prints the heap's reported budget and usage and
the live imports, and the refusal line names where its budget came from.
2026-10-15 21:04:31 +00:00
Hashaam ZafarandClaude Opus 5.5 4b8ccd2e42 test(agc): write more pixels than a pipe holds in the closed-pipe case
PixelFailure wrote a 128x128 payload, exactly the 64 KiB a default Linux
pipe holds. Once the consumer read the 54-byte header, the whole payload
fit in the pipe, so the write could finish before the reader closed and
the expected EPIPE never came. agc_frame_dump_io failed in 147 of 300 runs
on Linux. A 512x512 payload exceeds the default pipe capacity on Linux and
macOS, so the write always reaches the closed reader.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 14:04:10 -07:00
Adrià e16b2bcce1 Merge pull request #5852 from ErenYeager1836/fix/player-review-dialog-error-codes
fix(libSceCdlgPlayerReview): return error codes instead of throwing in initialize and terminate
2026-10-15 23:03:27 +02:00
Adrià de974eb83f Merge pull request #5870 from Sam-mon7/fix/promote-held-import-window
fix(agc): promote a held import window to its whole allocation
2026-10-15 23:03:21 +02:00
Adrià d82858e840 Merge pull request #5873 from ErenYeager1836/fix/playgo-dialog-unused-header-and-close-test
fix(libScePlayGoDialog): drop unused header and cover uninitialized close in guest test
2026-10-15 23:03:16 +02:00
Adrià 57dbce986b Merge pull request #5871 from ErenYeager1836/test/vr-setup-dialog-coverage
test(libSceVrSetupDialog): cover uninitialized close and initial status in guest test
2026-10-15 23:03:11 +02:00
Adrià 8ea9ade002 Merge pull request #5869 from ErenYeager1836/test/g2p-dialog-coverage
test(libSceCdlgG2P): cover uninitialized close and initial status in guest test
2026-10-15 23:03:06 +02:00