Commit Graph
14017 Commits
Author SHA1 Message Date
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
Dean a3dc0b52b0 Merge pull request #7337 from milescoviello/fix/test-fixture-validation
test(agc): create fixture command pools with the reset flag
2026-10-18 14:50:29 +13:00
Dean 7cdfbd2e9d Merge pull request #7152 from Bonjourcestmatt/fix/getdents-not-directory
fix(libkernel): report EINVAL for getdirentries on a non-directory
2026-10-18 14:50:26 +13:00
Dean 720f02ea89 Merge pull request #7342 from oneandonlydean/rescue/2468
fix(relinker): keep test artifacts in the build tree
2026-10-18 14:50:22 +13:00
Dean 0455317705 Merge pull request #7338 from oneandonlydean/rescue/3241
fix(libkernel): name module-relative call sites and thread ids in Linux wait traces
2026-10-18 14:50:19 +13:00
Dean ddf547fbf8 Merge pull request #7186 from simonbronk/codex/net-receive-address-guards-20261017
fix(libSceNet): guard recvfrom sender outputs before receiving
2026-10-18 14:50:15 +13:00
Dean f376eeb9ef Merge pull request #7176 from milescoviello/fix/asan-gpu-tests
fix(agc): run the AGC GPU tests in an ANYPS5_ENABLE_ASAN build
2026-10-18 14:50:11 +13:00
Dean 3d9ba7fce1 Merge pull request #7171 from MrMha/fix/oracle-cli-input-errors-20261017
fix: report oracle CLI input errors before running tools
2026-10-18 14:50:08 +13:00
T3cm0andClaude Opus 5.5 26898755e5 feat(libc): implement seed48 and lcong48
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:44:32 -05:00
T3cm0andClaude Opus 5.5 f68ab450e2 feat(libc): implement wcscspn, wcstoimax, wcstoumax, strtouq, rindex and flsl
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:44:06 -05:00
T3cm0andClaude Opus 5.5 58697488a2 feat(libc): implement the uchar.h conversions, mblen and wctomb
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:43:39 -05:00
T3cm0andClaude Opus 5.5 24a999c499 feat(libc): implement long double, Bessel and integer math exports
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:43:13 -05:00
T3cm0andClaude Opus 5.5 8283831a19 feat(libc): implement mergesort
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:42:46 -05:00
T3cm0andClaude Opus 5.5 300b7ff34c feat(libSceLibcInternal): implement inet_aton, inet_addr and inet_ntoa
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:42:20 -05:00
thuanquangandClaude Opus 5.5 48b394d1ec fix(agc): keep robustBufferAccess2 off on AMD's proprietary driver
Since #4048 enabled robustBufferAccess2, AMD's Windows driver draws
nothing in agc_driver_layered_volume_draw and agc_driver_layered_volume_vertex,
and the selected loads make the high half of agc_driver_subvector_loop's
wave64 skip its loop. Until the cause is found, that driver does not get
the feature, and its loads keep their selections.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 08:42:00 +07:00
T3cm0andClaude Opus 5.5 f9b7b230fc feat(libSceLibcInternal): implement the remaining posix_spawnattr accessors
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:41:26 -05:00
T3cm0andClaude Opus 5.5 66247cef5c feat(libc): implement the sceLibcPafMspace allocation exports
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:40:58 -05:00
NikoandClaude Opus 5.5 a3067a04d4 fix(agc): clamp a remapped depth at narrower bounds instead of rescaling it
ApplyDepthRemap gives the Vulkan viewport the console's clamp bounds
clipped to [0, 1]. A zero-to-one viewport maps the shader's z/w linearly
onto [minDepth, maxDepth], so with bounds narrower than [0, 1] the remap
rescaled the depth into them instead of clamping it there; only bounds
of [0, 1] or wider (Minecraft's [-1, 1]) came out right. Scale and offset
are now divided by the clamp range and the offset moved by its minimum,
so the viewport and the depth clamp together give scale * z/w + offset
clamped to the bounds.

agc_driver_depth_range_remap_draw draws through the remap path and,
when the device has VK_EXT_depth_range_unrestricted, through the
unrestricted path, then checks the stored depth with probe draws and
that the two clip distances cut at the near and far planes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 14:27:48 +13:00
NikoandClaude Opus 5.5 b28e6c83de fix(agc): keep viewport depth scale and offset out of the shader cache key
Only the remap mode changes what the vertex shader compiles to. Scale and
offset are specialization constants that each materialization takes from
its own request, so they no longer split the compiled variant per depth
transform. The result memo hashes them with the snapshot instead, so one
prepared vertex shader does not hand the module specialized for one
transform to a draw with another. sameVertexInfo repeated its first
comparison without paClVsOutCntl; the repeat is dropped.

A test pins the version 27 layout (the remap fields are the last bytes
of a vertex request), a version 25 replay, truncation and trailing-data
refusal, and that scale and offset leave the cache key alone while the
mode does not. agc_depth_range_remap materializes one prepared vertex
shader with two transforms and checks that each gets its own module.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 14:27:48 +13:00
Mouad-Scriptz-0andClaude Fable 5.1 53212b18ac feat(agc): remap a viewport depth range the device cannot express into the vertex shader
Without VK_EXT_depth_range_unrestricted a viewport depth range outside
[0, 1] threw. Minecraft (PPSA17221) draws its world with scale 1 and
offset 0 in negative-one-to-one clip space, so its depth is the raw z/w
clamped by PA_SC_VPORT_ZMIN/ZMAX. On such a device the vertex shader now
scales clip z so z/w is the console's depth, the pipeline clamps depth at
the console's bounds, and two clip distances restore the near and far
planes that depth clamping removes. Mode, scale and offset travel as
pipeline specialization constants from the draw's vertex stage info, in
both the per-draw and the registration-module path; mesh and tessellation
draws with such a range still throw.

The console's depth clamp bounds are clipped to [0, 1]: exact for a
normalized depth target or none, and reported once for a tested or
written float depth target, where a depth below 0 is stored as 0
(Minecraft clamps its float depth target to [-1, 1]). The shader
validator accepts the remap's two extra clip distances next to the one
a program may already export.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-18 14:27:48 +13:00
Romans Pokrovskis 7f53a96a9f test(agc): check the sample reader excludes cache snapshots 2026-10-18 04:25:27 +03:00
Romans Pokrovskis 9f9478fdf0 fix(agc): hold the pipeline cache while building sample readers 2026-10-18 04:25:27 +03:00