Commit Graph
14017 Commits
Author SHA1 Message Date
Adrià e967594f62 Merge pull request #5868 from Lorkydey/fix/autorun-system-failure
fix(relinker): propagate POSIX autorun failures
2026-10-15 23:01:29 +02:00
Adrià f10fd23b60 Merge pull request #5865 from billythemenace2/fix/kernel-flexible-memory-size-zero
fix(kernel): read a zero flexibleMemorySize in param.json as the default budget
2026-10-15 23:01:24 +02:00
Adrià c4bae34f94 Merge pull request #5866 from ErenYeager1836/test/login-dialog-coverage
test(libSceLoginDialog): cover uninitialized close and initial status in guest test
2026-10-15 23:01:19 +02:00
GalaxyGamingFRandClaude Opus 5.5 a70dea62e7 fix(check_main_sync): fetch an explicit --base before resolving it
main() resolved the base before running --fetch, so an explicit base on a
remote that was never fetched failed with "no base ref found" and never
fetched. The fetch is now a local helper and runs first when --base is
given; the default base still resolves first, then fetches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 14:01:15 -07:00
Adrià 82c0ab9aae Merge pull request #5855 from tototomate123/fix/hfw-depth-clear-current-main
fix(agc): ignore stale depth clear flags when no planes are bound
2026-10-15 23:01:15 +02:00
Adrià f27697f083 Merge pull request #5847 from akkadbakkad89/feat/kevent-ev-flags
feat(libkernel): implement kevent EV_DISABLE, EV_DISPATCH and EV_FORCEONESHOT
2026-10-15 23:01:10 +02:00
Adrià 006388ea7c Merge pull request #5846 from SeifKaroui/fix/avplayer-loop-warning
fix(avplayer): defer loop warnings until frame delivery
2026-10-15 23:01:04 +02:00
Adrià ab88420409 Merge pull request #5845 from pushkarreddyy/feat/libSceAgc-default-cx-state-flat
feat(libSceAgc): implement sceAgcGetDefaultCxStateFlat
2026-10-15 23:00:59 +02:00
Adrià 90dea83b59 Merge pull request #5718 from ErenYeager1836/fix/savedata-dialog-native-state-checks
fix(libSceSaveDataDialog.native): validate dialog state in close, get result and terminate
2026-10-15 23:00:55 +02:00
Adrià 7758abac13 Merge pull request #5841 from simonbronk/feat/line-reads-through-2d-array
fix(shader): read explicit-LOD and level-zero 2D-array samples through 1D T#s as measured
2026-10-15 23:00:50 +02:00
Adrià 8b99f0177c Merge pull request #5848 from wachi35676/refactor/libSceAgc-name-interpolant-mapping-10000
refactor(agc): name dbOlWdppb4o and vieBRwlh1Lw the _10000 interpolant mappings
2026-10-15 23:00:46 +02:00
Adrià b8aca1eeea Merge pull request #5843 from Ondra97/codex/fix-window-close-exit
fix(libc): skip guest exit handlers on host window close
2026-10-15 23:00:41 +02:00
Adrià 1e0555c1b1 Merge pull request #5837 from akkadbakkad89/carry/agc-recorder-discard-3298
fix(agc): discard recorder batches after submission failure
2026-10-15 23:00:36 +02:00
Adrià 7663bc63bb Merge pull request #5092 from MrMha/fix/scripting-heap-694
feat(libc): provide the runtime scripting allocator hooks
2026-10-15 22:58:23 +02:00
Adrià c10aa036d2 Merge pull request #5821 from SandstromPL/fix/agc-sampler-aniso-minmax-reduction
fix(agc): accept a min or max reduction sampler with anisotropic filtering
2026-10-15 22:58:19 +02:00
xXPBSXxandClaude Sonnet 5.5 50d8db46ea docs(usage): state that the shader cache directory has no size limit
The Shader cache section says only that subdirectories of other versions are removed after 14 days. housekeeping() in ShaderDiskCache.cpp removes nothing from the current version, and no size or entry limit applies there.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-15 22:56:35 +02:00
GalaxyGamingFRandClaude Opus 5.5 1cfa32a86b fix(check_compile): take changed units from the merge base
changed() diffed the working tree against the tip of the base, so files
changed only on upstream main since the branch point were reported and
compiled. It now diffs against the merge base of the base and HEAD.
A regression test covers a base-only change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 13:50:17 -07:00
GalaxyGamingFRandClaude Opus 5.5 501eac75f1 fix(progress_history): label axis dates on calendar days
Axis labels and grid lines were drawn only at data points, so a Monday
without a commit lost its label. The label loop now walks every calendar
day between the first and last point. A test covers a series that skips
several Mondays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 13:49:29 -07:00
GalaxyGamingFRandClaude Opus 5.5 6ce8d6b72a fix(nid_names): accept NIDs with a #lib#mod suffix in --nid
main() rejected --nid values carrying the #lib#mod suffix that load_db and
import_audit already strip and USAGE.md documents. The suffix is now removed
from each --nid value before validation, so lookup and output use the bare NID.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 13:49:19 -07:00
Yunus Shaikh 041af98c17 Merge upstream main into perf/shader-image-table-reuse-v3-pr 2026-10-15 13:46:41 -07:00
Adrià 4eb91eacdf Merge pull request #6560 from adriadam10/fix/main-mesh-pending-keys
fix(agc): zero the pending key store block, reapply #5791 with an llvmpipe skip
2026-10-15 22:43:35 +02:00
Adrià FranchandClaude d92ebfa882 fix(agc): validate mesh index descriptors on cached draws (reapply #5791)
Reapplies #5791 (reverted by #6552). agc_driver_mesh_index_cache now skips
on llvmpipe like agc_driver_mesh does: llvmpipe aborts compiling these mesh
programs (LLVM ERROR: Cannot emit physreg copy), which is what turned main's
linux job red.

Co-Authored-By: Claude <[email protected]>
2026-10-15 22:43:15 +02:00
Adrià FranchandClaude b40d527b33 test(agc): zero the whole pending key store block
agc_pending_key_stores cleared only the first 256 bytes of its 64 KiB block and
then asked for the keys of 512 bytes. The other 256 were whatever the heap
held: when they were not all equal the range read as mixed (correctly) and
the check that it is unknown failed, so the test passed or failed with the
allocator's state (main builds after #5784).

Co-Authored-By: Claude <[email protected]>
2026-10-15 22:43:15 +02:00
TamaleroandClaude Opus 5.5 07dd28f448 fix(libSceVideoOut): keep mouse clicks and motion off the pad while the title reads the mouse
The default bindings map the left and right mouse buttons to Square and
R2, and mouse mode maps motion to the right stick. A title that opens the
mouse with sceMouseOpen therefore gets every click twice: as a mouse
button and as a pad press. PPSA15388 treats the pad press as a switch to
gamepad input, re-centres its cursor and drops the click, so menu items
cannot be clicked.

While libSceMouse has a handle open, KeyboardMouse ignores mouse motion
and mouse-button presses. Releases still pass, so a button held before
the title opened the mouse is let go. Keys and the wheel are unchanged,
as with the IME guard next to it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 13:40:53 -07:00
Yunus Shaikh e9ff3b1768 fix(agc): plan a heap again when its mirror's range has left the write watch
A heap mirror is refreshed from the write watch. acquireMirror checked
the watch only when it made a mirror and reused an existing one as it
was. Once part of the range left the watch, the next address-based build
threw "a heap mirror's range is no longer write-watched" from the
refresh, and a build served from the address-space cache threw the same
from its heap runs. A range leaves the watch for good when a host import
that does not keep the watch covers it: on Windows a direct import of
private memory that is not settled (below the 1 MiB settle floor, or any
when imports cannot be settled), elsewhere any import while imports are
compared.

A heap mirror now records the unwatch serial at which its range was last
seen fully watched. Its reuse, and a cache hit over it, compare that
serial with GuestMemory::UnwatchSerial and look at the watch again only
when a range has left it since. A mirror whose range is no longer
watched is not reused, the cache is not taken (before its imports are
stamped), and the pass plans the range again: an import if the budget
allows, else a copy. A refused heap mirror also drops the registry's
stale one, whose buffer would stay allocated otherwise.
2026-10-15 20:40:32 +00:00
mattogepetoandClaude Sonnet 5.5 3f8337e730 fix(libSceSysmodule): test and document unknown module ids
sceSysmoduleIsLoaded, sceSysmoduleLoadModule and sceSysmoduleUnloadModule
return success for an id missing from the module table, because titles that
load or unload such an id aborted otherwise (b4db9fdd6, a2520aa07). Nothing
tested or recorded it, and two commented-out throws were left in the code.

Remove the commented-out throws, list the three functions under Silent stubs
in the library's technical debt file, and test that unknown ids succeed
without changing state while the internal variants still throw.

Written with AI assistance (Claude).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-15 22:33:13 +02:00
Ondra97 20a3a38844 fix(decoder): release decoded pixels when allocation fails 2026-10-15 22:28:03 +02:00
Scott SchusterandClaude Fable 5.1 4f8c8b127f perf(agc): fewer heap allocations per recorded draw
The committer built a recorded draw's resource key through two temporaries a shader, took the in-place and device read lists by value, and in PrepareDrawBindings built two layout-binding vectors only to test them for emptiness, a std::map of pool sizes a set, and copies of the descriptor buffer and write lists, all on every draw. The key is now built in place with its size reserved, the read lists fill a caller's vector, and the per-draw bookkeeping lives in the thread's scratch (ThreadOwned), as the selected-slot list already did. The queue worker's program list and memory snapshots reserve their size up front.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-15 15:27:33 -05:00
Yunus Shaikh e6068b79a6 test(agc): place the grid reference's depth samples and skip where none reads back at the guest's locations
The grid reference compared the exact path with a composite whose depth
the 3070 had read at the standard 2x locations, so its 3005 depth
mismatches said nothing about the exact path. It now places every
sloped depth sample of each render from the slopes' plane equations: at
the guest's sample location of its pixel and sample, or at the standard
2x location. When even the composite holds depth away from the guest's
locations, the device reads depth drawn at custom sample locations back
elsewhere despite the transitions that name them, no render can be
compared with it bit for bit, and the test skips with the counts.

A scene check that finds a wrong sample index now prints it, and where
the device draws depth at custom sample locations the bench also times
the swaps with the standard locations named at the depth copy's
transitions.
2026-10-15 20:26:08 +00:00
Yunus Shaikh f8e8dc6f67 fix(agc): log each sample count's largest location grid and take no 0x0 grid for a 2x2 one
The 3070, whose vulkaninfo reports a maxSampleLocationGridSize of 1x1,
ran the grid reference's native 2x2 render. vulkaninfo prints
VkPhysicalDeviceSampleLocationsPropertiesEXT, the grid every supported
sample count allows; the device setup reads each count's own
VkMultisamplePropertiesEXT (VulkanDevice.cpp), which may be larger at
low counts, and found an even grid at 2 samples there. The setup now
logs each count's largest grid next to the one for every count and
keeps it in the context, and the grid reference prints the one at 2
samples.

The setup's test for a 2x2 grid also took a 0x0 grid, whose sides are
even, for one. HostsSampleLocationGrid requires both sides to be nonzero
and even, and the planning test checks it.
2026-10-15 20:22:57 +00:00
JAB-devandClaude Sonnet 5.5 fbe49d6a68 test(libSceSysmodule): look up an earlier page of a cached unwind region after a later one
The backward lookup added with the region fix compared the address with a page it could not reach and never ran. The test now queries an ntdll address three pages in, then the first page, then the pages between, and compares each with VirtualQuery. The lookups after the first fail on the cache before the region fix.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-15 22:22:20 +02:00
Yunus Shaikh d9bd0f9b4d fix(agc): name a depth target's sample locations in the transitions around its reads
On the 3070 the grid reference read the composite's and the 2x2 grid's
depth at the standard 2x locations: sample 0 of pixel (14,0) held
0x3f00e5b5, the slope's depth at (14.75, 0.75), while the guest's sample
0 lies at (14.75, 0.5), whose depth 0x3f0153f8 the exact path held.
All 3005 samples the slopes cover differed. The depth surface stays in
the general layout for its life (DepthSurface.cpp, and the render
passes in Pipeline.cpp and SampleOrder.cpp), so no layout transition
ever names the sample locations it was drawn with, although the layout
of an image created with SAMPLE_LOCATIONS_COMPATIBLE_DEPTH depends on
them; the 3070 returned such depth at its standard locations when it
was sampled or copied. The exact path's even rows came out right
because its depth pass rewrites them at the stand-in's locations, but
its odd rows came from vkCmdCopyImage, read at the standard locations
and moved to the other sample; the 10 color mismatches, all in odd
rows, are the shade triangle's depth test against those values.

A pass that draws depth at custom sample locations now ends, after its
samples are back in the guest's order, with a transition of the target
to TRANSFER_SRC_OPTIMAL and back to the general layout that names the
locations it drew with, and the depth swap copies its target between
such transitions. The planning test checks both transition pairs, and
that a swap without sample locations still copies in the general layout.
2026-10-15 20:19:12 +00:00
Yunus Shaikh 210a585b67 Merge upstream main into perf/shader-image-table-reuse-v3-pr 2026-10-15 13:17:18 -07:00
Adrià ce991f1ec2 Merge pull request #6552 from adriadam10/revert/5791
Revert "fix(agc): validate mesh index descriptors on cached draws" (#5791)
2026-10-15 22:15:38 +02:00
Adrià FranchandClaude b8db74198e Revert "fix(agc): validate mesh index descriptors on cached draws" (#5791)
agc_driver_mesh_index_cache aborts on the linux job (lavapipe, LLVM 20.1.2:
"LLVM ERROR: Cannot emit physreg copy instruction") on every main push build
since the merge (first red: 38777177302). The PR was merged on a
windows-only run after a linux-red batch was split.

Co-Authored-By: Claude <[email protected]>
2026-10-15 22:15:16 +02:00
Yunus Shaikh 2b4db6a3a2 fix(agc): pick each pixel class's sample order word through a constant index
The color swap (SampleOrder.comp) chose a pixel's order word with
order.map[(at.x & 1u) | ((at.y & 1u) << 1u)], a push-constant vector
indexed by a value that differs between the lanes of a wave, returned
early for the pixels the order keeps, and gathered the held samples
through a private array indexed per lane. On the AMD Windows driver
(Radeon 0x1638, wave64) the 2x R8_UNORM round trip found sample 1 of
pixel (0,0) in its sample 0, and the grid reference's exact path read
sample index 1 in sample 0 of the same pixel, although the order keeps
that pixel's samples. Only the invocation of pixel (0,0) stores to it,
so that invocation ran the swap with another class's word.

Each invocation now handles one 2x2 quad and takes every pixel class's
word through a constant index, so the kept classes return uniformly,
and picks the held samples through selects. The depth swap's fragment
shader selects its word the same way. The planning test checks that no
sample order shader indexes a vector or array through a value that
varies between invocations, and a failed swap round trip counts its
wrong samples per pixel class.
2026-10-15 20:13:18 +00:00
javierUDP d67e7b7389 test(relinker): link the converter tests with a small macOS zero page
The CLZERO case that needs a 32-bit address found no mapping because a
64-bit Mach-O executable reserves 4 GiB as `__PAGEZERO`, not because
Rosetta withholds low memory: the same `mmap` succeeds once the
executable is linked with a smaller zero page. The Apple x86-64 build
links the test that way and the case runs with the other three, so the
skip it had is gone and the Linux mapping failure stays fatal. The arm64
build keeps the 4 GiB zero page, which it requires to start.
2026-10-15 17:10:59 -03:00
JAB-devandClaude Sonnet 5.5 a63e77e9fc fix(libSceSysmodule): report the region of the queried page from a cached unwind region
VirtualQuery describes the pages from the queried address to the end of the run of equal pages, so the reported seg0 begins at the queried page. The cached entry returned the first lookup's page for every later address in the run. It now returns the queried page and the bytes up to the end of the cached run, which is what VirtualQuery returns.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-15 22:08:20 +02:00
Gabrieljr42 3a2e9d2949 fix(tools): write progress site files as UTF-8 2026-10-15 17:07:42 -03:00
Gabrieljr42 a2392c0246 feat(tools): add a module filter and JSON output to progress.py 2026-10-15 17:04:10 -03:00
Ori ShamirandClaude Opus 5.5 f6fd60c6ca fix(libSceSaveData.native): write only the changed bytes of save-data memory
sceSaveDataSetSaveDataMemory2 read the whole slot file, patched it and
replaced it through a temporary file on every call, so each call cost a
full rewrite of the slot (up to 32 MiB). The changed ranges now go to a
small journal that is staged through the slot's temporary file and
renamed into place, then written into the slot file in place, and the
journal is removed. A journal left by an interrupted call is replayed by
the next setup, get, set or sync of that slot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 22:43:50 +03:00
Jota a4e6e8b3b2 fix(tests): keep generic category vtable entries castable to functions 2026-10-15 16:42:52 -03:00
HILAL El MehdiandClaude Opus 5.5 2a9390aa11 docs(debt): correct Windows GUI logging description
Since ab3e92605 the entry stub gives each missing standard handle
anyps5.log beside the executable, and the crash report writes to the
standard error handle, so it reaches the log too. The entry now records
only what is still lost: the stub's errors about the executable path or
about waiting for the previous LoadExec process, written before the log
is opened, and output to the missing handles when the log cannot be
created.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0154rPujpieMaCnZ6WMobg7M
2026-10-15 21:39:42 +02:00
billybobpicklioandClaude Opus 5.5 a0347cfed5 feat(agc): draw line-strip output of NGG geometry programs as mesh lines
A geometry program with VGT_GS_OUT_PRIM_TYPE 1 was refused as an
unsupported output assembly. Each primitive export of an NGG line-strip
program is one line whose indices are packed like a triangle's, so the
mesh module now declares OutputLinesEXT with PrimitiveLineIndicesEXT for
it. A subgroup gets VGT_GS_MAX_VERT_OUT - 1 lines per input primitive and
at least GE_MAX_OUTPUT_PER_SUBGROUP line slots; fast launch keeps using
PRIM_AMP_FACTOR. The output size is part of the cache, draw, validation
and pipeline keys, and the request serialization version becomes 31.
Triangle-strip geometry is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 15:39:35 -04:00
JJenkx 7777219ee1 feat(libkernel): support cpuset affinity by guest thread ID 2026-10-15 15:25:34 -04:00
al3w0f205andsimonbronk 7ef0bf1541 fix(tools): allow unwrap_self to place zero-size segments without a PT_LOAD host
When a decrypted SELF contains a non-PT_LOAD segment (such as PT_TLS for pure TBSS) with p_filesz == 0 whose virtual address lies outside any PT_LOAD memory range, unwrap_self previously refused the container with 'segment N vaddr 0x... is in no PT_LOAD'.

Allow zero-size segments without a matching PT_LOAD host to be placed with source offset 0 and new offset 0, preserving valid ELF headers for titles like Unity/IL2CPP PS5 builds.

Also allow file-empty PT_LOAD segments with stale out-of-file source offsets to skip the segment-extent bounds check, preserving memory sizes, addresses and alignments without reading container metadata.

Co-authored-by: simonbronk <[email protected]>
2026-10-15 14:22:04 -05:00
Get-fix 284fc6fd8c fix(relinker): treat DT_INIT_ARRAY without DT_INIT_ARRAYSZ as empty
The OpenOrbis create-fself drops a DT_INIT_ARRAYSZ of 0, so a PS4
program without constructors, such as the ClassiCube PS4 port, has
DT_INIT_ARRAY and no size. Code analysis rejected it with "incomplete
initializer array". FreeBSD 11.4's rtld takes the number of
initializers only from DT_INIT_ARRAYSZ and starts it at 0, so such an
array calls nothing; code analysis now adds no roots for it. A size
without an array still fails.
2026-10-15 22:21:28 +03:00
Yunus Shaikh 9c4bb70741 Merge branch 'perf/agc-host-import-aligned-blocks' into perf/agc-host-import-blocks 2026-10-15 12:12:29 -07:00
Muhammad Wasif Ali WasifandClaude Opus 5.5 7d9a308044 fix(nid): reject ELF exports that patch to different symbols under one name
Two defined ELF exports that are renamed to the same name, such as foo
and foo_nid_disambig1, were both written as one name and the patcher
exited 0, leaving a lookup that can reach only one of them. The PE and
Mach-O back ends already reject this.

The ELF patcher now remembers the address (st_value and st_shndx) of
each patched export name and throws "duplicate patched export name"
only when the name comes from a symbol at a different address. Aliases
of one address are kept: the Linux libc defines __cxa_throw and
__cxa_throw_nid_no_patch_cut as aliases of __cxa_throw_nid_postfix, so
both become __cxa_throw, and any lookup of that name resolves to the
same code.

The Linux libc also exported __gxx_personality_v0 twice at different
addresses: the forwarding function in Personality.cpp and the
__gxx_personality_v0_nid_no_patch_cut alias of the guest personality.
Drop that alias, so the name keeps only the forwarding function, as
in the PE build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 00:08:27 +05:00
Scott SchusterandClaude Fable 5.1 244f41ed24 fix(agc): a relocation trial counts the hits the verification captured again
With APS5_VERIFY_DRAW_ENTRIES=1 every hit is captured again, so drawHit is false and no relocated hit counted for its shader set's trial, which judged every set unproductive and turned the relocation off under the very mode meant to check it.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-15 14:06:44 -05:00