Commit Graph
14017 Commits
Author SHA1 Message Date
Dean 0b1d678fe5 Merge pull request #8148 from hamb3r/feat/libc-dinkumware-threads
feat(libc): export Dinkumware thread primitives from libc.prx
2026-10-21 06:21:49 +13:00
mantavisualandClaude Opus 5.5 73784e2050 fix(libkernel): leave a file's times untouched when Windows utimes refuses them
On Windows, utimes, lutimes, sceKernelUtimes and futimes open a
FILE_WRITE_ATTRIBUTES handle and only then encode the times. A time the
host cannot represent returned EINVAL without calling SetFileTime, and
with NTFS last-access updates enabled closing that handle set the file's
access time to the current time, so a rejected call still changed the
file and guest_file_timestamps failed on "access time preserves
microseconds". A rejected time now marks the handle with 0xFFFFFFFF,
which SetFileTime documents as preventing operations on the handle from
updating the times, before the handle is closed. Error order is
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 20:20:20 +03:00
Dean 989b6ea794 Merge pull request #7999 from mopga/fix/relinker-amd-only-sequence-in-place
fix(relinker): move in-place AMD-only replacements into a short instruction's stub
2026-10-21 06:19:51 +13:00
Dean ae12a951f5 Merge pull request #8114 from savvaniss/feat/declare-ps4-hasbro-imports
feat(libs): declare sceGameLiveStreamingEnableLiveStreaming and sceKernelPrintBacktraceWithModuleInfo
2026-10-21 06:19:07 +13:00
Ondra97 ad1650686c docs(libkernel): keep unmeasured policy query behavior concise 2026-10-20 19:18:49 +02:00
Dean 407d0d8df3 Merge pull request #8100 from LuisAguilarDev/feat/netctl-get-info-v6
feat(netctl): add sceNetCtlGetInfoV6 argument and connection checks
2026-10-21 06:18:12 +13:00
Emanuele 1b81383137 perf(agc): probe the f32 denormal flush on MoltenVK
The startup probe that lets shaders use the device's f32 denormal flush
instead of the emulated one only ran on devices that declare
shaderDenormFlushToZeroFloat32 with independent denormal behavior.
MoltenVK declares neither flushing nor preserving f32 denormals, so every
shader kept the emulated flush on every f32 add, multiply, fma, min, max
and comparison.

On MoltenVK the probe now runs too. Since the device declares no
DenormFlushToZero capability there, a module compiled for the hardware
flush declares no DenormFlushToZero execution mode and relies on the
native behavior the probe measured; when any probe result differs from
the emulated flush, shaders keep the emulation as before. Devices that
declare the capability are unchanged.
2026-10-20 19:16:39 +02:00
Kovalev Vladislav 2190ccd20c fix(shader): discover prebuilt caches through native Windows paths 2026-10-20 23:11:57 +06:00
Kovalev Vladislav b97b122f65 test(shader): isolate prebuilt cache directory discovery 2026-10-20 23:11:57 +06:00
priyanshrv-netizenandClaude Opus 5.5 e1018840e3 feat(libc): implement _Feraise
Raise the requested floating-point exceptions on the x87 and SSE units
and set errno as the console's libc.prx does.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-20 22:38:30 +05:30
Ondra97 2f2fd0f7a4 docs(libkernel): keep attribute query limits with attribute debt 2026-10-20 19:08:27 +02:00
Dean 2fee39f1b3 Merge pull request #6684 from SandstromPL/fix/relinker-guest-zero-init
fix(relinker): run a guest DT_INIT of 0 as the module initializer
2026-10-21 06:07:25 +13:00
Ondra97 07486d7cfa fix(libkernel): report current thread scheduling policy in attributes 2026-10-20 19:05:08 +02:00
xXPBSXxandClaude Sonnet 5.5 602f6e1bda fix(tools): report an unreadable cache in configure_seed
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 19:00:38 +02:00
Dean 83751168dd Merge pull request #8202 from babyhuey/feat/libkernel-open-event-flag
feat(libkernel): implement sceKernelOpenEventFlag
2026-10-21 05:59:15 +13:00
priyanshrv-netizenandClaude Opus 5.5 97d587f730 feat(libc): export the Dinkumware float characteristic tables
Add _Flt, _Dbl and _Ldbl, the 80-byte tables behind Dinkumware's
float.h macros, with the values the console's libc.prx exports.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-20 22:28:18 +05:30
xXPBSXxandClaude Sonnet 5.5 8977922244 fix(libkernel): drop undefined protection bits in mprotect
FreeBSD 11.4 kern_mprotect masks the argument with VM_PROT_ALL instead of
refusing it (sys/vm/vm_mmap.c:613). sceKernelMprotect already does this
since #5770; the POSIX mprotect export still failed with EINVAL.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 18:51:41 +02:00
Dean 1b08a33b12 Merge pull request #8548 from tkcm01/fix/windows-icon-utf8-path
fix(relinker): format invalid Windows icon paths as UTF-8
2026-10-21 05:47:06 +13:00
Emanuele f0fd092678 perf(agc): find a draw's highest index with a loop the compiler vectorizes
HighestDrawIndex read each index through a branch on the index size and
kept the maximum in a std::optional, so neither clang nor GCC vectorized
it, and an indexed draw scans its whole index range when its range is not
kept (fewer than Recorder::KeptIndexRangeIndices indices, or a range
whose memory is not tracked). The scan now runs one loop per index type:
the maximum without restart, or with restart the maximum of the indices
masked by whether they are the restart index, plus an OR of those masks
for whether any index was not a restart index. Results are unchanged.
2026-10-20 18:46:18 +02:00
priyanshrv-netizenandClaude Opus 5.5 91c401db5e feat(libc): export the remaining Dinkumware floating-point constants
Add _Denorm, _Hugeval, _Nan, _Snan, _FDenorm, _FSnan, _LDenorm, _LInf,
_LNan and _LSnan with the 16 bytes the console's libc.prx exports.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-20 22:15:51 +05:30
thuanquangandClaude Opus 5.5 d896645ec7 fix(relinker): name the guest module in its output filename errors
The checks on a guest module's output name threw without an input
path, so the conversion's catch reported the main executable. They now
carry the module's path, as the guest image reader's errors do. The
loop's duplicate-export check gets the same change for consistency; it
cannot fire, because the reader rejects a duplicate first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 23:45:00 +07:00
Dean d0852defa2 Merge pull request #6982 from XairRrR/perf/agc-drop-tracked-texture-snapshot
perf(agc): drop the guest byte snapshot of a large cached texture the write tracker covers
2026-10-21 05:38:58 +13:00
Dean baae66415c Merge pull request #5799 from SleglJan/fix/cube-output-modifiers
fix(shader): apply cube output modifiers whenever IEEE mode is off
2026-10-21 05:38:37 +13:00
aarushkhaandClaude Opus 5.5 261fe36987 fix(agc): check a pipeline cache file's existence through the long-path form
When the full read fails, readFile asked std::filesystem::exists with the
plain path, so on Windows a cache file past MAX_PATH was reported missing
instead of unreadable and could be saved over.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 22:00:08 +05:30
dantdmdarealguy a7e6e597d3 fix(libc): switch update streams to reading as FreeBSD does
On Windows the UCRT does not switch an r+, w+ or a+ stream from writing
to reading without fflush or fseek: fread after fwrite returned bytes of
the write buffer and the next flush wrote them over the file, and ungetc
failed on an update stream that was not already reading. On Linux glibc
does not switch either for ungetc, which pushes the byte back over the
pending write, drops the write and can corrupt the heap on the next read,
or for an fread of at least the buffer size, which drops the write and
reads from the old offset.

fread, fgetc, getc_unlocked, fgets, ungetc, ungetwc and fscanf now flush
pending output and mark the stream as reading first, as FreeBSD 11.4's
__srefill and __ungetc do, through _IO_switch_to_get_mode on glibc.
Writes directly after reads still go through the UCRT on Windows; the
gap is recorded in the libc technical debt.
2026-10-20 11:28:19 -05:00
aasishdairel 0d3f6f7262 test(relinker): split GS trap coverage groups
The Windows gs_traps group grew to 21 relinker invocations and ran close to its 30 s CTest timeout on a loaded host. Split the implicit-memory cases into gs_traps_implicit so each group stays well under the limit, and share the per-case check between them.
2026-10-20 21:54:30 +05:30
Adrià f6ce8e34a2 Merge pull request #7666 from tibzejoker/fix/normalized-storage-write-rounding
fix(shader): round normalized storage image writes from the exact product
2026-10-20 18:24:01 +02:00
aarushkhaandClaude Opus 5.5 21ff939156 fix(agc): read the pipeline cache header through the long-path form on Windows
PipelineCache::readHeader opened the cache file with a plain path while
readFile and the writer already use NativeCachePath_nid_no_patch. Past
MAX_PATH the header read failed, so every save saw the file as changed
and merged it again (#7452).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 21:53:16 +05:30
teepeanandClaude Opus 5.5 eef987ae7b perf(agc): fold the occlusion dumps of a queued store run once
A queued store run records each group's plain stores and then its
occlusion counter dumps, and any store after a dump starts a new group,
so a label the title writes after its dumps lands after them. A title
that clears each query slot, dumps into it and then writes a flag after
it gets a group per slot that way: a barrier, then three fold dispatches
with a barrier before each.

The run's writes are now recorded in three parts where that keeps the
final bytes: the stores before the first dump and the stores that a
later dump overlaps (the clears of the slots), then every dump in one
fold, then the other stores in their order. A store after a dump that
no later dump overlaps still lands after every dump before it, and those
stores keep their order. A clear that only a later dump covers in part
must not overlap an earlier dump, and no clear may overlap a store it
moves ahead of; otherwise the run keeps its groups.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-20 19:21:50 +03:00
Dean 6bef96df7c Merge pull request #8168 from savvaniss/fix/relinker-trailing-table-before-code
fix(relinker): accept a relative jump table padded to 16 bytes before more code
2026-10-21 05:17:27 +13:00
Dean ab07854a58 Merge pull request #8166 from savvaniss/fix/sce-gap-syscall-data
fix(relinker): treat data between PS4 unwind functions as data in the syscall scan and the code roots
2026-10-21 05:17:04 +13:00
Adrià 10e2cbf648 Merge pull request #7541 from ionut27001/fix/libkernel-sysctl-absent-names
fix(libkernel): return ENOENT for thirteen sysctl names, as measured on a PS5
2026-10-20 18:13:19 +02:00
LeandroLP23andClaude Opus 5.5 28ce7bc0b8 fix(agc): create every shader module through the pipeline-library cache key
Six vkCreateShaderModule calls added to main since this branch's base
still passed their SPIR-V unchanged, so on AMD's Windows driver they
shared on-disk cache entries across the two pipeline library modes:
splitComputePipeline's recompiled compute programs, the multisample
readback modules, the dispatch-arguments module, the texture repack
module and the two performance overlay modules.

Graphics::CreateShaderModule now keys the generator word and creates the
module in one place. Every module the driver creates goes through it,
including the recompiled graphics and compute programs that copied the
key inline, so new call sites can't skip it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 18:12:06 +02:00
tkcm01 4d07bc0231 fix(relinker): format invalid Windows icon paths as UTF-8 2026-10-20 12:10:00 -04:00
LeandroLP23andClaude Opus 5.5 f161a741db fix(agc): key the compute pipeline replay's module by the pipeline library mode
The replay rebuilds a captured compute pipeline to time it. With the
library feature off, production now flips the SPIR-V generator word
before vkCreateShaderModule. The replay creates the same module, so it
hits the same AMD driver cache entries as the run it reproduces.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 18:06:42 +02:00
PYTHONRETARDEandClaude Opus 5.5 d093d3b520 fix(agc): key shader modules by the pipeline library mode
AMD's Windows driver compiles pipelines differently when
VK_EXT_graphics_pipeline_library is enabled on the device, but its
on-disk cache (%LOCALAPPDATA%\AMD\VkCache) does not key on it. A process
in one mode is then served pipelines compiled in the other, and their
writes never land (#4768, #5271).

With the library feature off, every module now flips bit 15 of the SPIR-V
generator word, which no driver interprets, so the two modes hash to
separate cache entries.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 18:06:42 +02:00
tkcm01 7679fbd657 fix(tools): handle zero-size segments in unbacked PT_LOAD ranges in unwrap_self 2026-10-20 11:59:55 -04:00
valenciana-nc 4c106182dc fix(tools): compare recorded machine and title metadata 2026-10-20 09:58:42 -06:00
Dean 77e31219c8 Merge pull request #8116 from dantdmdarealguy/fix/libc-readdir-fileno-windows
fix(libc): report the file number of each readdir entry on Windows
2026-10-21 04:55:57 +13:00
Dean 7ee65dcf12 Merge pull request #8012 from MarrasFederico/feat/razor-cpu-no-capture-tags
feat(libSceRazorCpu): run the data tag and logical file access calls without a capture
2026-10-21 04:54:42 +13:00
Adrià c9f680fb36 Merge pull request #7727 from leorossi2005/feat/voiceqos-packet-attribute
feat(libSceVoiceQoS): implement packet and local endpoint attribute functions to unblock Aliens: Fireteam Elite
2026-10-20 17:50:25 +02:00
Adrià 1a48337f13 Merge pull request #7634 from imellag/fix/macos-guest-arena-walk-test
test(libc): check that the macOS guest arena keeps free space beside host regions
2026-10-20 17:47:19 +02:00
Dean f0d8e6924d Merge pull request #6165 from MarcZX10/codex/unwrap-self-truncated-elf
fix(tools): reject unsupported inner ELF encodings
2026-10-21 04:46:15 +13:00
Dean 10abe7d6da Merge pull request #8047 from fisherjoey/fix/template-texture-audit
fix(agc): fail a template's proof on a released texture and audit it with the full walk
2026-10-21 04:46:07 +13:00
Adrià 4036fab1b2 Merge pull request #7437 from lucaslima430/fix/libkernel-socket-fcntl-duplication
fix(libkernel): support socket fcntl duplication
2026-10-20 17:40:06 +02:00
Adrià 117fe9d608 Merge pull request #7625 from voidlakhan/fix/ampr-null-command-buffer
fix(ampr): validate null command buffer arguments
2026-10-20 17:36:49 +02:00
Adrià 2ee20b4200 Merge pull request #7575 from SeifKaroui/fix/signed-byte-memory-protections
test(libkernel): harden signed-byte memory protection coverage
2026-10-20 17:34:46 +02:00
Adrià 636aa09cb1 Merge pull request #7520 from milescoviello/perf/ir-single-use-list
perf(shader): keep one use list per IR value
2026-10-20 17:26:34 +02:00
Adrià b41a5ff685 Merge pull request #7516 from milescoviello/perf/f16-minmax-ordered-zero
perf(shader): leave out the both-zero select of f16 min and max
2026-10-20 17:26:28 +02:00
Muhammad Wasif Ali WasifandClaude Opus 5.5 243925113f fix(shader): order wave LDS accesses with a memory barrier on AMD's proprietary driver
A guest wave's lanes see each other's LDS writes without a barrier, so
the recompiler adds a subgroup-scope OpControlBarrier between an LDS
write and the next LDS access when the guest wave is one host subgroup
(WaveLdsScope). AMD's proprietary Windows driver 32.0.21042.62 (Vulkan
driver 2.0.353, "AMD proprietary shader compiler", Radeon 0x13c0)
compiles that barrier to s_barrier, as the pipeline's internal ISA
shows (26 s_barrier for the guest's 9 in a small LDS reduction). In a
workgroup of several waves, the waves that enter a branch holding LDS
accesses then execute extra s_barriers, which pair with the other
waves' barriers, and those waves read LDS before it is written. LLPC
compiles a subgroup-scope control barrier to a wave barrier instead.

PS5LM Plus (PPSA99581) answered with garbage on that driver: the first
compute dispatch of its first graph, an RMS norm with a 512-thread
wave32 LDS tree reduction, scaled every row except its first 32
elements by a partial sum, while NVIDIA matched a NumPy reference and
the inputs were identical.

On that driver the barrier is now a subgroup-scope OpMemoryBarrier,
which it compiles to no instruction. A 32-lane subgroup is one hardware
wave there, which runs its lanes in lockstep and issues its LDS
instructions in order; Vulkan does not guarantee that, so it is
recorded as debt. Other drivers keep the control barrier. The flag is
part of the shader cache key, and agc_shader_replay takes
--wave-lds-memory-barriers to replay a request the way that driver
compiles it.

agc_driver_lds_tree_reduction sums over eight wave32 waves the way the
guest does, with its last four steps inside one wave and no s_barrier
between them: before, thread 32 read 1936 instead of 32896 on the AMD
driver; it passes on AMD and NVIDIA now. agc_subgroup_barrier checks
the driver quirk and the emitted barriers on every runner. PS5LM Plus
now answers " Paris. It is the largest city in Europe ..." on the AMD
iGPU without flash attention, as on NVIDIA and the CPU.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 20:24:01 +05:00