Commit Graph

1343 Commits

Author SHA1 Message Date
Alex 63b2bcb354 fix(shader): flush v_ldexp_f16 denormals per the f16 denormal mode
v_ldexp_f16 ignored the FLOAT_MODE denorm16 flush bits on main. Flush a
denormal half input when bit 0 is clear. When bit 1 is clear, flush the
result when its exact value is below the minimum normal half, decided
on the f32 product before the half conversion rounds it: 0x07ff scaled
by 2^-1 is zero on RDNA2, not the minimum normal. NaN handling and
destination high-half preservation stay the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-11 04:24:00 -04:00
Adrià 7b5214d429
Merge pull request #846 from merwie/feat/relinker-module-dir
feat(relinker): add --module-dir for modules loaded at run time
2026-10-11 10:23:54 +02:00
Adrià bbd7157150
Merge pull request #822 from Celegans12/feat/agc-unnormalized-sampler-offsets
feat(agc): accept texel offsets with unnormalized sampler coordinates
2026-10-11 10:23:33 +02:00
Adrià 5c34f9e25e
Merge pull request #3319 from pushkarreddyy/feat/libSceHttp2-ping-interval
feat(libSceHttp2): export sceHttp2WebSocketSetPingInterval
2026-10-11 10:22:11 +02:00
Michon 56ea14f44c fix(agc): an HTILE fill covers a depth surface only over its whole pipe-aligned metadata
A fill was taken to cover the surface when it spanned ceil(w/8)*ceil(h/8)*4 bytes, a linear HTILE layout. In
the pipe-aligned SW_64KB_Z_X layout a surface's HTILE words lie across a 32 KiB metadata block per 1024x512
pixels (AMD PAL gfx10 addrlib: a 16x16 surface has a valid word at offset 260), so a fill of the linear size
cleared tiles it never wrote. HtileMetadataBytes gives that extent; the fast clear tests fill it (the compute
fixture now dispatches one group per KiB with TGID_X).

Reported with a PAL reproducer by @Amoenus.

Co-Authored-By: Amoenus <5391396+Amoenus@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 10:19:53 +02:00
Michon c133e23dde fix(agc): depth fast clears through the HTILE metadata
Rebased onto main as one commit (the six commits of #374). A uniform fill over a depth surface's whole
HTILE (DMA_DATA, the fill kernels or a CPU store) clears the depth and stencil aspects its ZMask and
SMem fields say, to DB_DEPTH_CLEAR / DB_STENCIL_CLEAR, when the surface is next bound or sampled.

Main's RADV clear_htile_mask recognition (#2229) now goes through the same pending clear: an HTILE clear
marks the matching surfaces' depth aspect, and one for a surface not created yet is applied when it is
first bound. Main's HTILE address decode and this one are merged into one (TILE_SURFACE_ENABLE, a
nonzero DB_HTILE_DATA_BASE and a depth format).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 10:19:53 +02:00
husari.orozco ce6edc5a00 build: reject an SDL2 without HIDAPI and fall back to shared SPIRV-Tools
A system SDL2 that does not define SDL_JOYSTICK_HIDAPI (sdl2-compat over
SDL3 ships no such macro, and neither does a build with the driver
disabled) fails pad_sdl and makes the disk audio driver open the port
with a different channel count, so ANYPS5_USE_SYSTEM_DEPS=ON now rejects
it with a named error, like the VK_KHR_maintenance8 check. Ubuntu's real
SDL2 defines the macro through its SDL_config.h indirection and is
unaffected.

SPIRV-Tools only exports SPIRV-Tools-static when built with
SPIRV_TOOLS_BUILD_STATIC=ON; distributions that ship it shared expose
SPIRV-Tools instead, so a shared target is aliased to the static name.
2026-10-11 10:18:23 +02:00
husari.orozco 96ad950914 build: add ANYPS5_USE_SYSTEM_DEPS option
Resolve SDL2, freetype, Vulkan-Headers, SPIRV-Headers, glslang and
SPIRV-Tools from the system instead of the bundled submodules when the
option is ON. It is OFF by default, so the bundled build is unchanged.

Every package is required: a missing one, or Vulkan-Headers older than
1.4.310 (the agc driver uses VK_KHR_maintenance8), fails the configure
with an error and nothing falls back to the submodule. The system
packages are exposed under the same target names the bundled path uses,
so the rest of the CMake is untouched.

SDL2 is linked from the system as a shared library because the prx
libraries are shared objects and distribution static SDL2 is usually not
PIC. ffmpeg-core, libjpeg-turbo, stb, VulkanMemoryAllocator and LibAtrac9
stay bundled.
2026-10-11 10:18:10 +02:00
GalaxyGamingFR f3216874c5 fix(progress): ignore braces in literals and comments when scanning bodies
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 17:16:25 +09:00
Abdulrahman Elkordy 0d2eeb87eb fix(libSceSharePlay): fill the connection info with no Share Play session
sceSharePlayGetCurrentConnectionInfoA now writes a 72-byte
SceSharePlayConnectionInfoA that reports no session: status DORMANT,
mode 0, empty online IDs, account IDs 0 and both user IDs invalid (-1).
A null pointer returns SCE_SHARE_PLAY_ERROR_INVALID_ARGS (0x810E0001)
instead of throwing. KytyPS5 and fpPS4 agree on the layout and the error
code; KytyPS5 sets the user IDs to -1, fpPS4 leaves them 0.

Claude-Session: https://claude.ai/code/session_012SLQbhAiexxW6TtjYToW8a
2026-10-11 17:14:21 +09:00
xXPBSXx 00fba4472c fix(libSceSharePlay): export sceSharePlayGetCurrentConnectionInfoA
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 17:14:21 +09:00
Merijn 1c6eac425d feat(relinker): add --module-dir for modules loaded at run time
Relinks the ELF modules of extra directories under the module parent directory. Modules the executable or another module needs start with the executable; the others are initialized when the title loads them with sceKernelLoadStartModule, with its start arguments (Windows: __aps5_guest_initialize export; Linux: left out of DT_NEEDED).

Squashed onto main by the reviewer (history had a merge commit).
2026-10-11 10:11:31 +02:00
Celegans12 d0d127b17d feat(agc): accept texel offsets with unnormalized sampler coordinates
Explicit-LOD offset samples through FORCE_UNNORMALIZED samplers now add
sign-extended texel offsets to f32 coordinates before clamping, using
OpFAdd with NoContraction and a sampler specialization selector.

Without native nonconstant-offset support, retain only runtime image
modes valid for unnormalized sampling and reject normalized samplers.
Preserve constant-swizzle handling, indirect-image rejection and main's
flat-volume and flat-line compatibility rules when selecting those modes.

Serialize image compatibility and folding flags and the sampler folding
flag in cache format 34, with roundtrip, preparation and execution coverage.
Retain main's request format 15 and runtime ABI 11.
2026-10-11 10:08:25 +02:00
Adrià f60923bf50
Merge pull request #3294 from kr4y4/feat/shader-compute-user-data-calls
feat(shader): link compute shaders' user-data callees at dispatch
2026-10-11 10:07:22 +02:00
Adrià Franch cfb372a035 fix(libSceHttp2): make sceHttp2WebSocketSetPingInterval throw, document under unknown function info
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 10:06:26 +02:00
pushkarreddyy fb2b7b8dce feat(libSceHttp2): export sceHttp2WebSocketSetPingInterval
Export sceHttp2WebSocketSetPingInterval (YfaXPnc8PJE) in libSceHttp2.

Resolves unresolved ELF import in Palworld (PPSA23126, Issue #2648) bundled libdiscord_partner_sdk.prx.
2026-10-11 10:06:05 +02:00
Adrià 1be0a7ce9b
Merge pull request #3324 from AchrafReyani/carry/host-import-span-windows-alias
fix(agc): import a span's ranges one at a time when Windows refuses its alias
2026-10-11 10:01:20 +02:00
Adrià Franch 8c619f16da docs(architecture): user-data callees; drop code comment
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 09:59:27 +02:00
krishnaraya 6d9321fc57 feat(shader): link compute shaders' user-data callees at dispatch
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 09:59:27 +02:00
Adrià 59f0269723
Merge pull request #3328 from overlordxrz-source/feat/sharpprospero-sw-version
feat(libs): implement the SharpProspero version queries and export sceSystemServiceLaunchApp
2026-10-11 09:59:15 +02:00
Adrià e89aabc916
Merge pull request #3326 from AchrafReyani/carry/conventions-silent-stub-section
fix(conventions): restrict silent stub exemptions to their section
2026-10-11 09:58:47 +02:00
Adrià 5460611fed
Merge pull request #3323 from TheAggie/feat/libkernel-cpuset-setaffinity
feat(libkernel): implement cpuset_setaffinity for the calling thread or process
2026-10-11 09:57:15 +02:00
Adrià 9f051dff35
Merge pull request #3218 from babyhuey/feat/libkernel-sysctl-rng-pseudo
feat(libkernel): support kern.rng_pseudo in sysctlbyname
2026-10-11 09:57:12 +02:00
Adrià a18aaeaa39
Merge pull request #3216 from hugodearaujo/fix/pool-stats-console-errors
fix(net): return the console's errors from the memory pool stats calls
2026-10-11 09:56:52 +02:00
Adrià 44395d9f95
Merge pull request #3260 from fma-rc/feat/font-writing-line-order
feat(font): order writing line runs by embedding level and report their spacing
2026-10-11 09:55:44 +02:00
Adrià 98da5a9267
Merge pull request #3238 from Tamalero/fix/playgo-undeclared-chunks
fix(libScePlayGo): accept chunk ids when the dump has no chunk definitions
2026-10-11 09:54:25 +02:00
Adrià 6a8f0ebb19
Merge pull request #2740 from Yousef13710/fix/content-library-exports
fix(content): export the content calls PPSA06465 imports
2026-10-11 09:53:27 +02:00
Hannah Lyons 04835bdcd1 feat(libkernel): support kern.rng_pseudo in sysctlbyname 2026-10-11 09:51:22 +02:00
Adrià 51b5f52a9e
Merge pull request #3152 from MarcZX100/codex/marc-select-timeout-range
fix(libkernel): saturate oversized select timeouts
2026-10-11 09:49:58 +02:00
Adrià 8ee2834a38
Merge pull request #2945 from MarcZX100/carry/libkernel-system-sw-version
feat(libkernel): implement sceKernelGetSystemSwVersion
2026-10-11 09:49:38 +02:00
hugodearaujo 7e5a34c58c fix(net): return the console's errors from the memory pool stats calls
Measured on a PS5 (firmware 13.60):
- sceSslGetMemoryPoolStats returns 0x8095F007 for a null output, before
  the id check, and 0x8095F006 for an unknown or terminated context,
  zeroing the 32-byte output.
- sceHttp2GetMemoryPoolStats returns 0x817B1225 for a null output,
  before the id check, and 0x817B1100 for an unknown or terminated
  context, zeroing the 32-byte output.
- sceNetGetMemoryPoolStats checks the pool before the output, so an
  unknown pool with a null output returns EBADF.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:49:13 +02:00
Adrià 65a4e8ef34
Merge pull request #2842 from Get-fix/fix/libc-daemon
fix(libc): export daemon
2026-10-11 09:49:05 +02:00
overlordxrz-source aaf5754d27 feat(libSceSystemService): export sceSystemServiceLaunchApp
AI-assisted: yes
2026-10-11 03:48:47 -04:00
overlordxrz-source aeee59614e feat(libkernel): implement sceKernelGetAllowedSdkVersionOnSystem
AI-assisted: yes
2026-10-11 03:48:47 -04:00
overlordxrz-source 26cad4e8c8 feat(libkernel): implement sceKernelGetProsperoSystemSwVersion
AI-assisted: yes
2026-10-11 03:48:46 -04:00
Achraf Reyani 94d6a82d83 docs(debt): list sceAudioInInit with the silent stubs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:46:16 +09:00
Adrià Franch db3c429e42 docs(playgo): update chunk-set comment and record unchecked chunk ids in TechnicalDebt
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 09:44:17 +02:00
Adrià Franch 1583126a35 docs(libkernel): record unverified sceKernelGetSystemSwVersion argument checks 2026-10-11 09:43:06 +02:00
MarcZX100 d8ba169df8 fix(libkernel): correct system version ABI layout 2026-10-11 09:43:02 +02:00
MarcZX100 e0e0b66cbb docs(libkernel): clarify system version ABI assumption 2026-10-11 09:42:57 +02:00
pushkarreddyy 5890160278 feat(libkernel): implement sceKernelGetSystemSwVersion
(cherry picked from commit 7143d0b46e389254b0b3bd52812a196ace0c7a6b)
2026-10-11 09:42:49 +02:00
fma-rc 5680c32381
fix(font): throw where the writing line error codes come from the PS4 module only and accept attribute 0 2026-10-11 09:41:52 +02:00
Get-fix 520b9facb6 fix(libc): export daemon
VLC (PPSA85300) imports daemon (Wn6I3wVATUE) and fails to load because
no library exports it. Forking into the background is not supported,
so it throws if called. VLC 3.0 calls daemon only when its daemon
option is set, and the title starts libVLC with --ignore-config and
without --daemon.
2026-10-11 09:40:35 +02:00
MarcZX100 4b3f02ab13 docs(libkernel): clarify guest socket descriptor range 2026-10-11 09:36:43 +02:00
MarcZX100 bb9bd2183c fix(libkernel): return ESPIPE for positioned socket I/O 2026-10-11 09:36:43 +02:00
Adrià 2bb78d2c7a
Merge pull request #1825 from TheAggie/feat/agc-ngg-vertex-mesh-v2
feat(agc): run unregistered NGG vertex programs that need a workgroup on the mesh path
2026-10-11 09:35:19 +02:00
Adrià a4b0b16bb8
Merge pull request #3244 from leorossi2005/feat/appcontent-download-progress
feat(libSceAppContent): implement sceAppContentGetAddcontDownloadProgress
2026-10-11 09:33:12 +02:00
Adrià a6d45b68fa
Merge pull request #3170 from fma-rc/feat/libscejobmanager-cpu
feat(libSceJobManager): implement CPU job sequences
2026-10-11 09:32:50 +02:00
Adrià 3db4637fcc
Merge pull request #2789 from tototomate123/fix/hfw-apr-split
fix(APR): correct guest resolution outputs, object layout and gather sizing
2026-10-11 09:32:21 +02:00
Adrià 683bb1c78c
Merge pull request #2788 from tototomate123/fix/hfw-http-split
fix(libSceHttp): retain request-status callbacks with the guest ABI
2026-10-11 09:32:00 +02:00
Scott Schuster bb4b938e34 feat(libkernel): implement cpuset_setaffinity for the calling thread or process
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 02:31:57 -05:00
Adrià 92bc441279
Merge pull request #3306 from CouchRiv/fix-shader-ldexp-f32-denorm-keep
fix(shader): keep f32 subnormals in v_ldexp_f32 when denormals are kept
2026-10-11 09:28:17 +02:00
Adrià 66479c96d0
Merge pull request #3281 from oneandonlydean/up4/amm-placement-3146
fix(libkernel): reserve the AMM virtual address ranges at the top of the guest arena
2026-10-11 09:27:00 +02:00
Abdulrahman Elkordy aa653ec50e fix(agc): import a span's ranges one at a time when Windows refuses its alias
#3158 imports a run of address-adjacent registered ranges as one span.
On Windows a shared mapping in the span needs a read-write alias, and
MapAlias refuses one unless the range is a single contiguous run of
views of one section. Ranges that are adjacent in guest address can be
separate views, so the refusal escaped from importAllocation and
agc_driver_dcc_keys_first_write failed on main with "read-write alias
of shared guest memory ...: the range is not one contiguous run of
views of a section".

A span whose alias is refused is now remembered, and its ranges are
imported one at a time as before spans; a single range that is refused
still throws.

Claude-Session: https://claude.ai/code/session_012SLQbhAiexxW6TtjYToW8a
2026-10-11 10:24:24 +03:00
xXPBSXx 1fb359b959 fix(content): export the content calls PPSA06465 imports
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 09:23:39 +02:00
Adrià 4484ddc0bf
Merge pull request #3105 from parl0v/feat/np-get-sandbox-info
docs(npmanager): name ZVZ++68nNI8 sceNpGetSandboxInfo, imported by PPSA28416
2026-10-11 09:23:05 +02:00
Adrià be8a67db1c
Merge pull request #3228 from GustavoGamarra95/feat/agc-alpha-to-coverage
feat(agc): emulate undithered alpha-to-coverage
2026-10-11 09:22:23 +02:00
Adrià 47c8e19eb7
Merge pull request #1619 from fisherjoey/fix/depth-compare-copy
perf(agc): sample comparison-read R32F/R16 surfaces from a GPU depth copy of their storage image
2026-10-11 09:21:23 +02:00
Adrià 010fad317a
Merge pull request #3194 from XairRrR/feat/agc-8-8-swap-alt-blending
feat(agc-driver): blend into COLOR_8_8 SWAP_ALT targets with a separate alpha equation
2026-10-11 09:17:35 +02:00
MarcZX100 c6c9e51439 docs(libkernel): document oversized select timeout 2026-10-11 09:17:07 +02:00
Adrià a258e5e3e7
Merge pull request #3222 from fma-rc/fix/shader-implicit-lod-2d-on-1d
fix(shader): sample a 1D T# through a 2D implicit-LOD image_sample
2026-10-11 09:16:28 +02:00
Adrià a41bad9771
Merge pull request #3141 from MarcZX100/codex/carry-sce-dyn-3093
fix(relinker): read SCE dynamic tables from PT_SCE_DYNLIBDATA
2026-10-11 09:15:56 +02:00
Adrià 1f2161bf5c
Merge pull request #2977 from MarcZX100/fix/shader-f64-denorm-preserve
fix(shader): preserve f64 denormals when supported by Vulkan
2026-10-11 09:15:32 +02:00
Adrià 7b98a306c0
Merge pull request #3160 from babyhuey/feat/libkernel-sys-fork
feat(libkernel_sys): export fork and implement setsid and umask
2026-10-11 09:14:48 +02:00
Adrià 75c979ad9f
Merge pull request #3056 from TheAggie/feat/libkernel-get-app-info
feat(libkernel): implement sceKernelGetAppInfo
2026-10-11 09:12:54 +02:00
Adrià 833e5eb507
Merge pull request #3142 from MarcZX100/codex/carry-sce-scan-3093
fix(relinker): stop code scans at the PLT for PS4 executables
2026-10-11 09:12:30 +02:00
Adrià 1884f17d1e
Merge pull request #2140 from overlordxrz-source/fix/shader-volume-address-planar-texture
fix(shader): read 2D-array T#s through 3D image accesses
2026-10-11 09:12:23 +02:00
Adrià bae9962954
Merge pull request #3108 from AchrafReyani/feat/opus-celt-dec-exports
fix(opus): export the libSceOpusCeltDec module
2026-10-11 09:07:53 +02:00
Alex 54d4024c2b fix(shader): keep f32 subnormals in v_ldexp_f32 when denormals are kept
With the f32 denormal field of FLOAT_MODE set to keep, v_ldexp_f32
flushed subnormal inputs and results to zero. Keep subnormal inputs and
round a result that lands in the subnormal range in the f32 round mode
of FLOAT_MODE. An overflow follows the round mode as well, with or
without denormals kept: the largest finite value instead of infinity
when the mode rounds that sign toward zero. This matches RDNA2
(gfx1036) on 2163 rows in each round mode. Denormal modes 1 and 2 now
throw.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 02:36:48 -04:00
Dean 946df245ef
Merge pull request #3012 from CouchRiv/fix-shader-f16-directed-rounding
fix(shader): honor directed f16 rounding in f16 conversions and ldexp
2026-10-11 19:35:14 +13:00
Dean 4213dda236
Merge pull request #3278 from oneandonlydean/carry/alx-rne-tininess
perf(shader): check f32 product tininess in one multiply to nearest even
2026-10-11 19:09:09 +13:00
SynnZer0 8ad1bcb589 fix(libkernel): ignore the input st_size of sceKernelGetModuleInfoFromAddr
The bundled libc.prx of PPSA21703 calls sceKernelGetModuleInfoFromAddr
with a 0x1A8-byte stack buffer and never sets st_size, so the field holds
whatever was on the stack (983040 in one run) and the call threw. The
console cannot require the field on input. The full size is still
written back. The flags check is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 02:02:38 -04:00
Adrià Franch fdc0b5268b docs(technical-debt): record the NGG vertex mesh routing assumptions 2026-10-11 07:56:42 +02:00
Dean b7222870c9
Merge pull request #3200 from hugodearaujo/feat/rudp-status-console
fix(libSceRudp): match the console's init and status checks
2026-10-11 18:54:38 +13:00
Dean 6db55f7718
Merge pull request #3110 from Recapi/feat/pad-vr-controller-read-state
feat(libScePad): export scePadVrControllerReadState
2026-10-11 18:54:29 +13:00
Dean af08c417eb
Merge pull request #2887 from babyhuey/feat/libsceaudioout-sys-hdmi-monitor-info
feat(libSceAudioOut): export the sceAudioOutSys HDMI output functions
2026-10-11 18:54:19 +13:00
MrMha 49a50abd80 chore(agc): synchronize wait fix with current main
Retain the original WAIT_REG_MEM fix from #2985 and resolve its test-registration conflict with main d7cfa728. Preserve both upstream test blocks and the original commit ancestry.

Local conventions and whitespace checks pass. Windows/GPU results cited in issue #2832 belong to their reporting contributors. No local GPU execution.
2026-10-11 09:53:09 +04:00
Adrià Franch 41b2841b0a docs: format sceAppContentGetAddcontDownloadProgress technical debt line
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 07:48:17 +02:00
Leonardo 228c8a0d6e docs: document sceAppContentGetAddcontDownloadProgress in technical debt 2026-10-11 07:48:11 +02:00
Dean d7cfa72813
Merge pull request #3150 from MarcZX100/codex/marc-socket-vector-io
fix(libkernel): route vector I/O on guest sockets
2026-10-11 18:47:36 +13:00
Dean 0cf94023b6
Merge pull request #3047 from babyhuey/feat/libkernel-pthread-kill
feat(libkernel): implement pthread_kill
2026-10-11 18:44:02 +13:00
Adrià Franch 4474548223 docs(libSceJobManager): move the TechnicalDebt line off the end of the section 2026-10-11 07:40:46 +02:00
fma-rc 8897c5ceac fix(libSceJobManager): count a wait before serialising it and close under the lock 2026-10-11 07:40:37 +02:00
fma-rc e2a7aac32d feat(libSceJobManager): implement CPU job sequences 2026-10-11 07:40:37 +02:00
Dean 4f6024863e
Merge pull request #2918 from XairRrR/feat/videoout-vrr-peg
feat(libSceVideoOut): accept VRR peg and unpeg on a fixed-rate output
2026-10-11 18:37:08 +13:00
tototomate123 63d29116b4 fix(http): retain request status callbacks with the guest ABI 2026-10-11 07:36:46 +02:00
Adrià Franch b299350a7a docs(debt): record the unverified ForEach resolve count 2026-10-11 07:27:53 +02:00
tototomate123 65c8ef656f fix(apr): compact gather records to avoid command buffer exhaustion 2026-10-11 07:27:52 +02:00
Dean 33c0cffb7e
Merge pull request #3134 from SleglJan/feat/agc-display-rgba16-float
feat(agc): present 16-bit float display buffers
2026-10-11 18:20:13 +13:00
fma-rc 25afd95d35
fix(font): keep the step fields the library leaves alone and test multi-level closing 2026-10-11 05:55:36 +02:00
fma-rc eecba6888d
feat(font): order writing line runs by embedding level and report their spacing 2026-10-11 05:48:07 +02:00
MarcZX100 16adcd4871 fix(relinker): validate SCE dynamic data segment 2026-10-11 03:30:09 +00:00
Get-fix ef727569cc fix(relinker): read SCE dynamic tables from PT_SCE_DYNLIBDATA
DT_SCE_STRTAB, DT_SCE_SYMTAB, DT_SCE_RELA and DT_SCE_JMPREL are offsets
into the PT_SCE_DYNLIBDATA segment, as the code analysis and the guest
image reader already read them, but the pipeline read them as file
offsets. That only works when the segment starts at file offset 0, as in
the test fixtures. A PS4 executable (CUSA00900) keeps the segment at
0x53e9b40, so the relinker read its relocations from the code and failed
with "Dynamic string offset is outside DT_STRSZ". Without the segment the
values are still read as file offsets.

(cherry picked from commit 5dbf89a57e096f2891ae786f44c3f57935af2285)
2026-10-11 03:25:49 +00:00
MarcZX100 ebaa687d36 fix(shader): respect float control independence 2026-10-11 03:09:34 +00:00
ThatsLeo 24c4dbae1e fix(shader): keep f64 denormals where the device can preserve them
Shaders with f64 instructions now declare DenormPreserve for 64-bit floats
when the device reports shaderDenormPreserveFloat64. Without it Mesa ANV
flushed the subnormal result of v_fma_f64 to zero.

(cherry picked from commit 7df6c709de994cea0019707d45b6e7b96698fad1)
2026-10-11 03:09:34 +00:00
Adrià Franch bf779b2d71 docs(technical-debt): move the depth copy line off the end of the file 2026-10-11 04:52:43 +02:00
Joey Fisher b384183505 test(agc): pin the depth copy path, its refresh on reuse, R16 and several mips and layers; drop APS5_NO_DEPTH_COPY 2026-10-11 04:52:36 +02:00
Joey Fisher d024709cff perf(agc): sample comparison-read R32F/R16 surfaces from a GPU depth copy of their storage image 2026-10-11 04:52:36 +02:00
Adrià Franch 859f2f3b92 feat(libc): implement malloc_usable_size
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 04:41:39 +02:00
Adrià Franch b1267b3388 docs(technical-debt): list the random family under unknown function info
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 04:07:59 +02:00
David 1671179c4f feat(libc): implement random, srandom, initstate and setstate
Port FreeBSD 11 lib/libc/stdlib/random.c (freebsd-src 4ab2e064): the
additive feedback generator with the default 128-byte TYPE_3 table,
good_rand seeding, state sizes rounded down to 8, 32, 64, 128 or 256
bytes, setstate returning the previous state, and initstate returning
null below 8 bytes without setting errno. Calls are serialised by one
lock; a null state throws.

The import audit of the homebrew catalog on main 262c0316 lists them as
absent libSceLibcInternal imports:
- random: PPSA74126 Stremio Plus, PPSA85300 VLC, PPSA99169 RetroArch,
  PPSA99177 PS5VR, PPSA99420 PS5MC, PPSA99505 Jelly5, PPSA99515 Emby5,
  PPSA99810 PSBox Cloud Gaming
- srandom: PPSA85300, PPSA99169, PPSA99420, PPSA99810
- initstate, setstate: PPSA99177, PPSA99420, PPSA99505, PPSA99515

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 04:07:38 +02:00
Adrià Franch 250b617f14 docs: record the two-pass blend into 8_8 SWAP_ALT targets 2026-10-11 04:00:52 +02:00
Adrià Franch 3cd36b0135 feat(libc): implement acosl and frexpl
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 03:58:47 +02:00
fma-rc 8132ac7a21
docs(debt): state the measured steps and the non-pixel LOD of a 2D implicit-LOD sample on a 1D T# 2026-10-11 03:57:24 +02:00
fma-rc eb2c43a2eb
fix(shader): sample a 1D T# through a 2D implicit-LOD image_sample
A plain image_sample that says DIM 2D on a 1D T# takes its texel and its LOD
from the first coordinate alone, measured on RDNA2 (gfx1036) with the
hardware oracle. Astro's Playroom draws with such a pair.
2026-10-11 03:54:50 +02:00
Gustavo Ariel Gamarra Rojas 7d92bf70f9 feat(agc): decode undithered alpha-to-coverage
DB_ALPHA_TO_MASK 0xaa01, the enable bit with the four offsets at 2 and no OFFSET_ROUND, reaches the pixel stage, which keeps a pixel when its MRT0 alpha is at least one half. Dithered or rounded settings, and an MRT0 that is missing, swizzled, packed or exported without a floating-point alpha, still throw. God of War Sons of Sparta (PPSA28997) stopped on it a few minutes into play.
2026-10-10 22:50:46 -03:00
Adrià Franch d4b9808705 fix(libkernel_sys): keep umask bits up to 07777 like FreeBSD
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 03:36:40 +02:00
Hannah Lyons 9c38ea16cf docs: say where XashPS5 calls fork 2026-10-11 03:36:32 +02:00
Hannah Lyons 967de40393 feat(libkernel_sys): export fork and implement setsid and umask 2026-10-11 03:36:32 +02:00
Claude 7c4f9381d4
Merge upstream main into fix-shader-f16-directed-rounding
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K9MzdVqDf6wHUKzNymQSze
2026-10-11 01:33:16 +00:00
MarcZX100 d78af2c710 fix(libkernel): route vector I/O on guest sockets 2026-10-11 01:16:58 +00:00
Adrià Franch bbe26912dc fix(agc): view 4_4_4_4 textures as B4G4R4A4, which every Vulkan device can sample
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 03:13:40 +02:00
Scott Schuster 39748573b0 docs(technical-debt): record what sceKernelGetAppInfo infers
AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 03:11:29 +02:00
Hannah Lyons d8af71c0ca feat(libkernel): implement pthread_kill 2026-10-10 21:11:29 -04:00
Dean Galvin 5543c73b37 fix(libkernel): reserve the AMM virtual address ranges at the top of the guest arena
The AMM ranges were reserved address-less on first use, so they took the
lowest free address of the arena, directly after the title's last mapping,
where the title's next hinted maps go. They are now reserved at a fixed
place, the last 64 GiB of the guest arena, which maps without MAP_FIXED and
the hints derived from them do not reach; a reservation that cannot be made
there throws.

Fixes #3146
2026-10-11 13:56:11 +13:00
hugodearaujo 4c4e789a33 fix(libSceRudp): match the console's init and status checks
Measured on a PS5 (firmware 13.60):
- sceRudpInit rejects a null pool or a size of 0 or less with
  INVALID_ARGUMENT, and a pool under 0xC58 bytes or not 8-byte aligned
  with MEMORY (0x80770007).
- sceRudpGetStatus rejects a null pointer or a byte count of 0 or above
  0xF8 with INVALID_ARGUMENT and reports the live context count at 0x64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 21:40:27 -03:00
Adrià 06da117642
Merge pull request #3176 from adriadam10/carry/pthread-attr-setsolosched-np
feat(libkernel): implement pthread_attr_setsolosched_np
2026-10-11 02:24:45 +02:00
Adrià 343163a0c1
Merge pull request #3174 from adriadam10/carry/system-gesture-no-touch
fix(libSceSystemGesture): report no touch events for the primitive and recognizer calls
2026-10-11 02:22:43 +02:00
Adrià Franch 8d90c1f190 docs(technical-debt): list pthread_attr_setsolosched_np under unknown function info
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 02:11:41 +02:00
David 064f5ca825 feat(libkernel): implement pthread_attr_setsolosched_np
The POSIX alias takes (attr, int), returns EINVAL (22) for a null or
uninitialized attribute like the other pthread_attr setters, and
stores the value through scePthreadAttrSetsolosched, returning its
result in errno form. The signature and the stored int follow the SCE
twin in KytyPS5 and sharpemu; PS5PCEM implements the alias the same
way. The value is not applied to scheduling, recorded in TechnicalDebt.

Returnal (PPSA01285 v03.000.005) stops on it after eager binding
(#2872, #1155):

    what(): pthread_attr_setsolosched_np_nid_postfix not implemented

LEGO Horizon Adventures (PPSA14632, #734) and Palworld (PPSA23126,
#2598) import it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 02:06:30 +02:00
Adrià Franch 894ef6db09 test(libSceSystemGesture): cover the handle and null checks of every recognizer call
Moves the no-touch line to "Silent stubs" and records the error-code disagreement with KytyPS5.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 02:04:04 +02:00
Adrià e8d6de4ae7
Merge pull request #1091 from kjhq/feat/libkernel-socket-events
feat(libkernel): implement read and write events for guest sockets
2026-10-11 02:02:31 +02:00
xXPBSXx 6e2ea0a071 docs(technical-debt): list the system gesture no-touch behavior
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 02:01:32 +02:00
AlxcBTW 4e7511dc32 perf(shader): check f32 product tininess in one multiply to nearest even
#2839 decides f32 product tininess after rounding, in all four f32
round modes, from the exponents and a UMulHi and IMul of the
significands, and builds the flushed value from them. To nearest even,
the mode of shaders without a known float mode and of the 0xc0 most
titles use, one multiply decides it: one factor times 2^64, which is
exact below 2^64, times the other factor rounds the exact product once
to 24 bits in the normal range, and 0 < |that| < 2^-62 is tininess
after rounding. A product that rounds up to 2^-126 is then not tiny and
keeps the emitted product, which is 2^-126 there, so nothing has to be
built from the significands.

The flush of v_mul_f32 v5, v6, v7 takes 12 IR instructions instead of
34, counted as the instructions the flush select needs beyond the
product. vector_constant_factor_tininess pins 12 to nearest and 36 for
the directed path of the same instruction, and checks that the
directed modes and v_mad_legacy_f32 (before rounding) keep #2839's
check. Its round-to-nearest branches are removed as unreachable.

The f32 denormals entry says which rounding the check inherits: the
multiply is a plain OpFMul like the product, with no f32 rounding mode
requested, so it relies on the driver rounding f32 to nearest even, as
the products do. F32ConstantFactorTininess names the row a check before
rounding flushes, 0x3f7ffffe * 0x00800001, which keeps the emitted
0x00800000.

Against #2839 to nearest even, a model of both checks agrees on
1,074,977,546 operand pairs (every 24-bit significand at both rounding
thresholds, random pairs, specials) with each other and with an exact
reference. On an RTX 5070 the outputs of #2839's own tininess and
mixed-source shaders are bit-identical with either lowering over
165,298 and 164,008 generated rows in all six float modes tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 01:54:16 +02:00
kjhq 0abe0b832b feat(libkernel): wake socket read and write events instead of polling
A wait on an equeue that holds socket events now blocks in poll/WSAPoll on
those sockets plus a per-thread loopback wake socket, instead of rechecking
every millisecond. Adding, triggering or deleting an event and closing the
equeue wake the blocked waiters. Closing a socket removes its read and write
events, as on FreeBSD. A read event also reports EV_EOF once the peer has
shut down its sending side.
2026-10-11 01:54:15 +02:00
kjhq 9b7535c6a4 feat(libkernel): implement read and write events for guest sockets
sceKernelAddReadEvent/DeleteReadEvent and sceKernelAddWriteEvent/
DeleteWriteEvent register EVFILT_READ and EVFILT_WRITE events on guest
sockets. The equeue polls the host socket for readiness on each wait
and reports the readable byte count or the send buffer size in data,
with EV_EOF on hang-up or error.
2026-10-11 01:54:04 +02:00
MarcZX100 324be50c64 docs(libkernel): record condition wait errors 2026-10-11 01:53:27 +02:00
XairRrR 9021735022 feat(libSceVideoOut): accept VRR peg and unpeg on a fixed-rate output
sceVideoOutVrrPegToFixedRate and sceVideoOutVrrUnpegFromFixedRate were
NotImplemented without arguments. Both take the output handle; the peg
also takes two further arguments whose meaning is unknown. VRR is not
modelled and the output always runs at a fixed rate, so both validate
the handle and return 0; non-zero peg arguments throw. Recorded in
TechnicalDebt.

Uncharted: Legacy of Thieves Collection (PPSA05684) stops on main with
"sceVideoOutVrrUnpegFromFixedRate not implemented"; it passes its
output handle to both (and zeros to the peg) and ignores the results.
2026-10-11 01:52:10 +02:00
Adrià ed79bde5b9
Merge pull request #2987 from CouchRiv/fix-shader-f16-addmul-denorm-flush
fix(shader): flush scalar f16 add/mul/sub denormals to signed zero
2026-10-11 01:51:46 +02:00
Adrià 9d792ae477
Merge pull request #2989 from CnRJay/fix/srt-null-root-reads
fix(recompiler): read SRT words through a null user-data pointer as zero
2026-10-11 01:49:13 +02:00
Adrià 9402d32fc2
Merge pull request #2993 from CnRJay/fix/agc-indirect-getsize-count
fix(agc): ignore the count passed to the indirect register GetSize functions
2026-10-11 01:48:56 +02:00
Adrià b64c75fc12
Merge pull request #2939 from CnRJay/fix/agc-dcc-comp-to-single
fix(agc): expand comp-to-single DCC keys in a DCC decompress pass
2026-10-11 01:46:49 +02:00
Adrià c633e6d532
Merge pull request #2880 from SleglJan/fix/shader-log2-near-one
fix(shader): correct v_log_f32 near 1.0 when the driver's log2 strays from a series
2026-10-11 01:46:08 +02:00
Adrià 5bd6912b0b
Merge pull request #2978 from MarcZX100/fix/libkernel-rwlock-destroy-busy
fix(libkernel): return EBUSY when destroying a held rwlock
2026-10-11 01:45:28 +02:00
Adrià 59a8cbab89
Merge pull request #2981 from MarcZX100/codex/system-service-language-2769
feat(libSceSystemService): select the console language
2026-10-11 01:43:53 +02:00
overlordxrz-source c447b289ca fix(shader): read 2D-array T#s through 3D image accesses
Since #2133, a 3D image_sample_lz or image_load bound to a 2D-array T#
decodes as 2D and matches the new 2D mode, so it reads layer 0 for any
r and returns zero for z != 0. adriadam10 measured on RDNA2 (gfx1035)
that dim 3D on a 2D-array T# behaves exactly like dim 2D-array, with r
or z as the layer. Decode a 2D-array T# bound to a 3D access as 2D-array
and add a 2D-array mode next to the 2D one.

The same measurement covers image_load_mip on both T# types and
image_get_resinfo, which returns (w, h, 1, levels) on a 2D T# and
(w, h, layers, levels) on a 2D-array T#. Allow those accesses and return
1 as the third resinfo component through the 2D mode. image_get_lod is
not measured and keeps throwing.
2026-10-10 23:42:50 +00:00
Adrià Franch 9678b46d8b docs(technical-debt): state the key range comp-to-single uniformity is judged over 2026-10-11 01:38:32 +02:00
Chad b89b7f953c fix(agc): expand comp-to-single DCC keys in a DCC decompress pass
Key 0x10 (GFX9_DCC_CLEAR_SINGLE in Mesa) marks a 256-byte block whose texels all equal its first texel. A CB DCC decompress pass over uniform comp-to-single keys now writes that texel over its block and stores uncompressed keys; a fast-clear eliminate over them throws.
2026-10-11 01:38:27 +02:00
Adrià Franch c9d1dbe6ed docs(debt): record rwlock destroy EBUSY choice 2026-10-11 01:37:32 +02:00
Adrià Franch 1e1554c768 docs(technical-debt): record the strided buffer overhang clamp 2026-10-11 01:37:01 +02:00
Adrià 29083579f4
Merge pull request #2873 from CouchRiv/fix-shader-div-scale-denorm-flush
fix(shader): flush v_div_scale_f32 input denormals
2026-10-11 01:35:02 +02:00
Adrià Franch 3983f16e37 docs(technical-debt): v_log near 1.0 bound from the exhaustive band sweep
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 01:33:54 +02:00
Jan Šlégl 447f3a5080 docs: note the unconditional log2 series and its f16 path
v_log_f16 is lowered through the same f32 log2, so the entry names both
and states the f16 effect measured over every f16 input (one NVIDIA
result moves onto the hardware's bits, none on RADV). The series is
chosen with OpSelect, so its cost applies to every v_log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fnrk5Dazjb2tLooVSpdRQq
2026-10-11 01:33:44 +02:00
Jan Šlégl 580ac08478 fix(shader): correct v_log_f32 near 1.0 when the driver's log2 strays from a series
The driver's Log2 has an absolute error that does not shrink with the
result, so near 1.0 the relative error explodes: on an RTX 3080, v_log_f32
of 1 - 2^-24 is 23,947,836 ULP off. Measured on RDNA2 (gfx1036), the
hardware's log2 is within 1 ULP of the correctly rounded value, and an
eight-term series in x - 1 is within 2 ULP of both for |x - 1| <= 1/8.

The lowering keeps the driver's Log2 and takes the series only inside that
band when the two differ by more than 4 ULP, so RADV's native result stays
bit-exact and NVIDIA's is within 6 ULP inside the band.
agc_driver_log_near_one pins 64 inputs per type from the oracle with
per-lane tolerances.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GLfKH7Sqe51wX254k1XsV
2026-10-11 01:33:44 +02:00
Adrià 2cae6cc3cd
Merge pull request #2917 from XairRrR/feat/agc-prepare-unpredicted-variants
feat(agc-driver): prepare shader variants registration did not predict
2026-10-11 01:31:32 +02:00
Adrià 1e52f94ea1
Merge pull request #3147 from SleglJan/feat/libc-realpath
feat(libc): implement realpath
2026-10-11 01:22:38 +02:00
Adrià 2b5d119fc5
Merge pull request #3138 from MarcZX100/codex/carry-font-script-3125
feat(font): retain script language and typographic design settings
2026-10-11 01:19:31 +02:00
Adrià 7d294690e2
Merge pull request #2856 from CouchRiv/fix-agc-shared-code-two-headers
fix(agc): retain registered headers sharing shader code
2026-10-11 01:18:38 +02:00
Adrià 53924632bb
Merge pull request #2675 from husseinkad/fix/lds-atomic-mixed-width-lock
fix(shader): LDS 32-bit atomics take the workgroup lock of the program's 64-bit LDS atomics
2026-10-11 01:15:44 +02:00
Alex cf637814eb fix(shader): flush v_div_scale_f32 input denormals
Enable the existing input-only f32 flush policy for division scaling.
RDNA2 measurements pin all three sources and signed zeros; keep the
scaling rules unchanged and retain their separate technical debt.

Co-Authored-By: Codex gpt-6.1-sol <noreply@openai.com>
2026-10-11 01:14:31 +02:00