Commit Graph
12196 Commits
Author SHA1 Message Date
Dean f28ae2d5a4 Merge pull request #7139 from AlexOfTheForest/feat/poll-files
feat(libkernel): poll files, directories, the random device and stdio as FreeBSD does
2026-10-18 16:52:12 +13:00
Dean Galvin fd301c78a5 perf(agc): release settle-retired imports after the overlap block of a pin wait
The Windows release of imports retired during a settle read belongs after the whole
overlapsImport block in the not-holding-the-lock branch of WaitForLeasesAndImports, as in
the original change, not inside it. It was placed inside while main was merged in.
2026-10-18 16:47:05 +13:00
thuanquangandClaude Opus 5.5 a7499e072f fix(relinker): skip a dumper's backup copy of a module beside the module
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 10:41:02 +07:00
Dean Galvin 2ec16fb1c2 test(agc): follow request format 33 in the serializer replay tests
The depth remap fields moved to request format 33 when this branch was rebased onto
main's format 32. The replay tests that rebuild older streams now drop and append the
remap tail on top of the linked call fallbacks and the spanned waves flag, and the
depth remap test downgrades to format 32.
2026-10-18 16:38:36 +13:00
Dean Galvin 57d3e85ca8 Merge main into pr/depth-clear-2 2026-10-18 16:37:09 +13:00
Dean 1e2d9b369b Merge pull request #7346 from thuanquang/fix/depth-bits-32-guest-memory
fix(agc): read a 32-bit depth-bits T# over guest memory through a float view
2026-10-18 16:22:26 +13:00
Dean 43663419cb Merge pull request #7343 from BiladeiroSupremo/fix/agc-row-scan-reduction
fix(shader): reduce a DPP row scan read at a row's last lane over the…
2026-10-18 16:22:23 +13:00
Dean a644767534 Merge pull request #7366 from milescoviello/fix/pthread-join-self-first
fix(libkernel): answer a join of the calling thread before its detach state
2026-10-18 16:22:19 +13:00
Dean 1ab64e7f0e Merge pull request #7365 from milescoviello/fix/sigprocmask-invalid-how
fix(libkernel): fail sigprocmask with EINVAL for an unknown how
2026-10-18 16:22:16 +13:00
Dean d9656f1283 Merge pull request #7353 from T3cm0/bionic/mergesort
feat(libc): implement mergesort
2026-10-18 16:22:12 +13:00
Yunus Shaikh 326104974a test(agc): read the depth bits of a SW_64KB_Z_X surface from guest memory
A compute shader loads every texel of a 256x192 32_UINT, 32_SINT and
16_UINT texture in SW_64KB_Z_X whose memory holds a known pattern and no
depth surface, from untracked memory and from a guest allocation, and
stores what it read. Every texel must keep its stored bits, NaN, infinity
and denormal patterns included; without the 32-bit fix the 32_UINT read
throws.
2026-10-17 20:19:49 -07:00
Evgeniy Kazarin 1d9bf1e029 perf(libc): reuse saved direct-memory buffers when unreferenced 2026-10-18 06:10:30 +03:00
thuanquangandClaude Opus 5.5 8f03282f5e fix(agc): draw geometry programs with the last provoking vertex
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 10:07:02 +07:00
Dean Galvin 6dde6cf658 Merge main into perf/image-table-index-scratch 2026-10-18 16:05:24 +13:00
Dean Galvin 67e7043332 Merge main into feat/poll-files 2026-10-18 16:04:36 +13:00
Dean Galvin 70e444582d Merge main into perf/agc-async-settle 2026-10-18 16:04:01 +13:00
Evgeniy Kazarin 97c11bcb94 perf(libc): release exact resident mappings without repeated queries 2026-10-18 06:03:30 +03:00
Yunus Shaikhandpoonasor e8b3198337 fix(shader): end a pixel shader's failed BDA reads through one exit
Every guest-memory read of a pixel shader that can fault ended the
invocation with its own OpTerminateInvocation, or OpKill without the
extension. A main-menu pixel shader of NHL 27 (PPSA34063) has 216 such
exits and Demon's Souls (PPSA01342) up to 112, and AMD's Windows driver
crashes in vkCreateGraphicsPipelines on those modules
(amdvlk64.dll+0x9e251f).

The guest code is now emitted as its own function: a failed read sets a
private flag and returns, and the entry point calls it and terminates
once when the flag is set. A pixel shader without a fault site keeps a
plain entry point, with no exit and no SPV_KHR_terminate_invocation.
Primitive-ordered pixel shaders keep the old form, as their interlock
instructions must stay in the entry point.

Based on poonasor's design in poonasor/AnyPS5@eb2e2309, ported to
current main.

Co-authored-by: poonasor <[email protected]>
2026-10-17 19:58:59 -07:00
Dean 2626e5ee7e Merge pull request #7360 from milescoviello/perf/srgb-table-initializer
perf(shader): initialize the sRGB decode table once per module
2026-10-18 15:58:50 +13:00
Dean c4fea909a5 Merge pull request #7335 from EagleBearerYS/prep/np-trophies-part2
feat(libSceNpTrophy2,libSceNpUniversalDataSystem): record trophy unlocks and statistics
2026-10-18 15:58:22 +13:00
Evgeniy Kazarin d2ca227e8f perf(libkernel): find direct-memory aliases through the physical index 2026-10-18 05:55:38 +03:00
thuanquangandClaude Opus 5.5 4aaa125279 test(agc): drop the comment above the guest depth-bits case
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 09:55:38 +07:00
Dean 5dd2e365b7 Merge pull request #7189 from tibzejoker/perf/grow-resource-cache
perf(agc): grow the resource cache while the keys it evicts come back
2026-10-18 15:55:35 +13:00
Dean 3b887b51c8 Merge pull request #5917 from fdfawef324/codex/stencil-null-feedback
Merged while @adriadam10 is away; he approved this head.
2026-10-18 15:52:50 +13:00
Dean c534fc0af7 Merge pull request #7339 from oneandonlydean/rescue/2779
fix(agc): harden host import construction and mutation waits
2026-10-18 15:52:28 +13:00
Dean 6313b1f890 Merge pull request #7364 from SandstromPL/fix/test-aniso-reduction-no-mip
fix(test): sample the anisotropic min/max rows without a mip filter
2026-10-18 15:52:24 +13:00
Dean 1d8524be7c Merge pull request #7352 from T3cm0/bionic/inet-aton-ntoa
feat(libSceLibcInternal): implement inet_aton, inet_addr and inet_ntoa
2026-10-18 15:52:20 +13:00
Dean 628047ef6c Merge pull request #7349 from T3cm0/bionic/posix-spawnattr-accessors
feat(libSceLibcInternal): implement the remaining posix_spawnattr accessors
2026-10-18 15:52:17 +13:00
Dean 3ef424a7f6 Merge pull request #7348 from T3cm0/bionic/paf-mspace
feat(libc): implement the sceLibcPafMspace allocation exports
2026-10-18 15:52:13 +13:00
Crimson af0af833c1 fix(shader): use 64-bit buffer atomics for device-memory LDS
Compute LDS beyond the device's shared-memory limit lives in a storage
buffer, and its 64-bit atomics took a lock in that buffer. AMD's Windows
driver compiles the lock's acquire and release to s_barrier, which inside
the divergent lock loop pairs with the program's own barriers, so the
device-memory case of agc_driver_lds_lock_budget read half its sum.

With shaderBufferInt64Atomics the device-memory LDS now uses a 64-bit view
of the buffer instead: 64-bit atomics are compare-exchange loops on it and
32-bit atomics stay native, so no lock is taken. Without the feature the
lock is kept. The per-workgroup slice is rounded up to an even dword count
so that the 64-bit view stays aligned.
2026-10-18 05:47:30 +03:00
milescovielloandClaude Opus 5.5 4ebc7d7d43 fix(libkernel): answer a join of the calling thread before its detach state
scePthreadJoin checked whether the thread was detached before whether it
was the calling thread. So a detached thread joining itself got EINVAL
instead of EDEADLK, and so did the main thread, which scePthreadSelf
adopts as detached. FreeBSD's join checks the calling thread right after
the null check and before it looks at the detach state. The self check
now comes first; the null, detached and already-joined answers are
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 02:41:38 +00:00
Karim Ibrahim ea61baec62 fix(relinker): resolve symbol-name imports through NIDs on Windows
Homebrew built with the ps5-payload-dev SDK imports by symbol name and
names its system libraries with .sprx, while the libraries in libs/
are .prx files that export NIDs. Quake from the websrv launcher
stopped with 457 unresolved imports such as strlen and malloc.

An import without a module that no searched library exports under its
name is now looked up again under the NID of that name. A dependency
named with .sprx, .suprx or .debug_prx loads the .prx library of the
same stem, and libkernel_web also loads libkernel.prx, as
libSceLibcInternal already loads libc.prx.
2026-10-17 22:40:09 -04:00
milescovielloandClaude Opus 5.5 8cd9c1d310 fix(libkernel): fail sigprocmask with EINVAL for an unknown how
sigprocmask and _sigprocmask threw std::invalid_argument for a how other
than SIG_BLOCK, SIG_UNBLOCK or SIG_SETMASK, which ends the title. FreeBSD
returns -1 with EINVAL and leaves the old mask uncopied, and ignores how
when set is null; pthread_sigmask here already returns EINVAL. The check
now comes first, before the previous mask is written.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 02:37:39 +00:00
pushkarreddyy 991df771fc feat(libSceAgcDriver): support CMASK fast clears on base mip 0 of mipmapped 2D targets 2026-10-18 08:06:35 +05:30
Yunus Shaikh 6720211da1 Merge main into perf/shader-image-table-reuse-v3-pr 2026-10-17 19:24:20 -07:00
Dean b39d90bf14 Merge pull request #7357 from T3cm0/bionic/seed48-lcong48
feat(libc): implement seed48 and lcong48
2026-10-18 15:20:36 +13:00
Dean 49e657e83b Merge pull request #7356 from T3cm0/bionic/wide-string-exports
feat(libc): implement wcscspn, wcstoimax, wcstoumax, strtouq, rindex and flsl
2026-10-18 15:20:32 +13:00
Dean 5cc435f02f Merge pull request #7355 from T3cm0/bionic/uchar-conversions
feat(libc): implement the uchar.h conversions, mblen and wctomb
2026-10-18 15:20:29 +13:00
Dean 82a119ad69 Merge pull request #7354 from T3cm0/bionic/long-double-math
feat(libc): implement long double, Bessel and integer math exports
2026-10-18 15:20:26 +13:00
Dean 5a240614e4 Merge pull request #7351 from thuanquang/fix/amd-robust-buffer-access2
fix(agc): keep robustBufferAccess2 off on AMD's proprietary driver
2026-10-18 15:20:22 +13:00
Yunus Shaikh 8f6f7d7500 Merge main into fix/agc-sample-location-grid-exact 2026-10-17 19:10:21 -07:00
SandstromPLandClaude Opus 5.5 7f9427a763 fix(test): sample the anisotropic min/max rows without a mip filter
The two anisotropic rows of agc_driver_image_sample_reduction sampled
a two-level texture at explicit LOD 0.25 and 0.75 through a point mip
filter, and expected only the nearest level in the min or max. Vulkan
leaves the anisotropic filtering scheme to the implementation, and
only recommends that it consider mipmapMode, minLod and maxLod. On an
RTX 4090 (NVIDIA 616.92) the min row returns 5, a level-1 texel, where
level 0's bilinear minimum is 17, so the test fails on main there.

The rows now use no mip filter, which the decoder turns into a host
sampler with minLod and maxLod 0, so they read level 0 only, as the
RDNA2 measurements without derivatives did (gfx1030 with no mip filter
over a single-level texture, gfx1035 with image_sample_lz). They still
throw if the min or max reduction with anisotropy is refused again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 07:38:34 +05:30
Yunus Shaikh 2848253fe4 Merge main into fix/recompiler-once-per-pixel-sample-inputs 2026-10-17 19:06:51 -07:00
milescovielloandClaude Opus 5.5 e273a65352 perf(shader): initialize the sRGB decode table once per module
DecodeSrgbTexel looked up the 256 table constants and stored the whole
table into its Private array at every decode site. The constants are
interned, but once a module has more than the declaration cache's 512
entries, each of those lookups that misses walks every slot before it
reaches the map. The table is now built on first use as the Private
array's initializer, as the buffer format table already is, and later
sites only index it.

The sRGB image load test checks that the recompiled module holds one
table, initializes one variable with it and never stores it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 02:02:41 +00:00
Dean 195d0d08a8 Merge pull request #7334 from milescoviello/fix/rect-list-clip-distances
fix(shader): pass clip distances through the rect-list stages as the vertex shader writes them
2026-10-18 15:01:00 +13:00
Dean 0e94c5d434 Merge pull request #6243 from EagleBearerYS/perf/shader-direct-cpu-evaluable-images
perf(shader): select the record of a T# whose offset the CPU evaluates
2026-10-18 15:00:57 +13:00
Dean 199e2ceb2f Merge pull request #7262 from EagleBearerYS/prep/np-trophies
feat(libSceNpTrophy2): report the title's trophy data from trophyNN.ucp
2026-10-18 15:00:53 +13:00
Dean Galvin 2af047862e fix(agc): journal the viewport depth remap of a pipeline
The depth remap mode, scale and offset change the pipeline a draw creates, so the
pipeline journal's recipe carries them. The file format is bumped and the State
layout guard follows the new size.
2026-10-18 14:59:16 +13:00
hamb3r ed85bd05ce Merge remote-tracking branch 'origin/main' into fix/shader-msaa-array-descriptor-shape
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
#	core/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cpp
2026-10-18 04:53:06 +03:00
Dean 154d627e38 Merge pull request #7341 from MarcZX100/codex/noreturn-unimplemented-stub
fix(libc): mark unimplemented NID handler as non-returning
2026-10-18 14:50:33 +13:00