Commit Graph
14017 Commits
Author SHA1 Message Date
Yossi Yadgar ae111b9c07 test(agc): drop a shared range's backing when the range goes away
Each SharedRange in agc_host_import_sparse registered a pointer to its
Backing in the global list Resolve searches, and never removed it. The
ranges live on the stack of each check, so by the last check the list
held pointers into stack frames that had been reused. On this machine
Resolve matched one of them for the fourth check's range and returned
an unrelated descriptor (st_size 0, offset 46330441829925), the sparse
path was not chosen, and the check failed with "a failure at
vkQueueBindSparse after the sparse path was chosen did not throw".
Whether it passes depends on what the compiler leaves in those frames.

The range now removes its Backing when it is destroyed. The test passes
20 of 20 here, and fails again when a vkQueueBindSparse failure no
longer throws, which it could not show before.
2026-10-14 12:42:28 +03:00
Dean 4f61889850 Merge pull request #4683 from XairRrR/fix/agc-depth-plane-stencil-pairings
fix(agc): share a depth plane's contents across its stencil pairings
2026-10-14 22:41:51 +13:00
Dean c3bad39372 Merge pull request #5434 from milescoviello/fix/relinked-module-name-case
fix(libc): find a relinked module whose name differs in case
2026-10-14 22:41:23 +13:00
Dean 5744094e79 Merge pull request #5506 from codingreapermaps/feat/agc-z64kbx-color-targets
feat(agc): render into SW_64KB_Z_X color targets
2026-10-14 22:40:55 +13:00
Dean 9c6315c904 Merge pull request #5323 from lubaxe/feat/agc-mesh-clip-cull-distances
feat(agc): clip and cull distances on the mesh path
2026-10-14 22:40:26 +13:00
Dean 318f237602 Merge pull request #5258 from JAB-dev/perf/unwind-info-cache
perf(libkernel): cache the unwind tables and image name per module on Windows
2026-10-14 22:39:58 +13:00
Dean 1a40d3d81f Merge pull request #5013 from p3n1cillin/claude/select-pipes
feat(libkernel): select on pipes on Windows
2026-10-14 22:39:38 +13:00
Dean 469f6e5368 Merge pull request #5427 from mariusyo07/feat/netctl-v6-callbacks
feat(libSceNetCtl): implement sceNetCtlRegisterCallbackV6 and sceNetCtlUnregisterCallbackV6
2026-10-14 22:39:09 +13:00
Dean 21da4061be Merge pull request #5413 from mariusyo07/feat/audioout2-disable-chat
feat(libSceAudioOut): implement sceAudioOut2DisableChat
2026-10-14 22:38:41 +13:00
2e461aa2e4 build(recompiler): generate the shader cache version as a source file
ShaderCacheVersion.cmake wrote the source version and the APS5_* switch
list into a generated ShaderCacheVersion.hpp that ShaderDiskCache.cpp
included. The version hashes every recompiler source, so any content
change under core/shader/recompiler rewrote that header and recompiled
ShaderDiskCache.cpp next to the file actually edited.

The script now writes ShaderCacheVersion.cpp, which defines
Generated::SourceVersion and Generated::RecompilerSwitches (a span over
the same sorted switch list) with constinit. They are declared in the
new ShaderCacheSourceVersion.hpp in the source tree, which
ShaderDiskCache.cpp includes; the generated directory is no longer an
include directory. The header has a different name from the old
generated one so that a build directory that still holds the stale
ShaderCacheVersion.hpp next to the generated .cpp cannot pick it up.

What is hashed is unchanged: the same manifest (recompiler sources,
HostThreadLocal.hpp, submodule commits, compiler, build type,
architecture and flags), the same checks and the same rewrite-only-
when-different step, so the version still changes exactly when it did.
Running the upstream/main script and this one with the same arguments
over this tree gives the same version (0x7907101dc4d8c62e) and the same
26 switches, and a second ninja run has no work to do. The value
differs from the one main 682ef0c17 generates (0xdce3a0ce03bf030a) only
because this commit edits hashed files, as any recompiler change does.

Tested with ninja -d explain -j 4 shader_recompiler_agc_driver,
CCACHE_DISABLE=1, after appending a line to
IntermediateRepresentation/src/IrType.cpp, three runs on main and then
three runs on this commit back to back, with the machine at 100% CPU
from other builds. On main ShaderCacheVersion.hpp and
ShaderDiskCache.cpp.obj are dirty and the rebuild takes 22.0/23.9/22.2 s.
With this change only ShaderCacheVersion.cpp.obj and IrType.cpp.obj are
compiled, ShaderDiskCache.cpp is absent from the explain output, and the
rebuild takes 12.2/14.7/15.0 s. The shader and recompiler ctest set
(26 tests) passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

Co-Authored-By: Codex <[email protected]>
2026-10-14 05:38:36 -04:00
Yunus Shaikh c54854b2bd fix(agc): find a view's region when the cached address space dissolves after UploadPrepare
UploadFinish dissolves the cached address space when an import was
retired after the space was built. The space's base regions are then
merged with the build's own regions, which since readsOverBase may
overlap them. owner() searched the merged list for the region with the
greatest begin, a base region of one mapping, so a read-only V# merged
into an own region that began earlier was bound through it again:

  guest buffer view 0x1f0390c1c4+0x10c1cc exceeds its GPU owner
  0x1f03900000-0x1f03910000 (buffer 0, direct 1, mirror 0)

The dissolve now notes when the merged list overlaps, and owner() then
looks back for a region that holds the whole range. The test's third
build retires the imports between UploadPrepare and UploadFinish.
2026-10-14 02:38:14 -07:00
Dean 6f12584c9b Merge pull request #5443 from SandstromPL/fix/relinker-executable-module-host-needed
fix(relinker): share guest modules between executables that need different system libraries
2026-10-14 22:38:14 +13:00
eljackjoestar-cmd bfab566fef fix(shader): normalize reserved buffer bits before scalar binding 2026-10-14 22:38:13 +13:00
eljackjoestar-cmd aa2abf801b fix(shader): ignore unused descriptor fields for scalar buffer loads 2026-10-14 22:38:13 +13:00
Dean 64380313b5 Merge pull request #5521 from codingreapermaps/feat/agc-alpha-coverage-without-color
fix(agc): alpha-to-coverage from a 32_AR MRT0 export without a color target
2026-10-14 22:37:55 +13:00
Dean Galvin 3b8bf7eab5 test(agc): keep the pixel LDS read-modify-write slots within 1 KiB
Each pixel used its own 16-byte slot across 512 pixels, so the
per-invocation LDS array held 8 KiB for a test that only needs one slot
per lane of a wave. 64 slots and the counter right after them keep the
array at 320 dwords, which software rasterizers compile in a fraction
of the time.
2026-10-14 22:37:42 +13:00
Dean Galvin 13cc3a9ea6 fix(shader): size per-invocation LDS by the append counter's offset
FunctionLdsDwords bounds every LDS access by its address argument and
gives up on opcodes without a dword count. DataAppend and DataConsume
have neither: their first argument is M0, which only places GDS
counters, and the emitter addresses the LDS counter by the instruction
offset alone. Any pixel or vertex-path program with ds_append or
ds_consume therefore declared the full 8192-dword Function array per
invocation. LLVM 20 llvmpipe needs about 6 s to compile that array in
the new pixel LDS read-modify-write test, which ran past the 5 s
graphics fence on CI. The counter now takes the dword at its offset.
2026-10-14 22:37:42 +13:00
Dean 3d4ef27694 Merge pull request #3655 from EdouardSence/fix/bda-lookup-compact
fix(shader): keep each BDA page-table walk to one inlined copy per read
2026-10-14 22:37:25 +13:00
Dean Galvin 6f830952fb ci(release): check out nested submodules
build.yml runs git submodule update --init --recursive, but release.yml checked out only the top-level submodules. A submodule with its own submodules, such as Mbed TLS's framework in #3897, would leave the release configure step without them.
2026-10-14 22:37:06 +13:00
Dean bf8e69d581 Merge pull request #4446 from Scramblrrrr/codex/buffer-heap-fallback-main
fix(agc): select coherent buffer heaps using available budget
2026-10-14 22:36:56 +13:00
hypermistandClaude Opus 5.5 30fab0777e perf(recompiler): keep the vector window's unindexed slots out of the array
A shader with any v_movreld kept its whole relative-addressing window (167
registers in a PPSA08427 compute shader) in one Function-storage array, which
the device puts in local memory. The window array now holds only the slots the
relative accesses likely reach (from a bound analysis of their indices); every
other slot is a variable of its own the device can keep in a register. A
relative access whose index lands past the array at run time switches over
those variables, so the guess only affects speed. APS5_NO_WINDOW_NARROWING=1
turns it off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Uzy15wqYTt6iWyxYXEzUWo
2026-10-14 22:35:34 +13:00
eliasbruno124-dev b737308eed fix(ssl): retain loaded certificate authorities 2026-10-14 22:34:22 +13:00
Alexej Szpevák 8e812f4b73 fix(relinker): report RIP-relative operands of far indirect CALL and JMP
DecodeInstruction returned before reading the ModRM of FF /3 and FF /5,
so a far CALL or JMP through a RIP-relative pointer had no RIP-relative
displacement. A stub that moved such a JMP copied the displacement
without relocating it.

The decoder was compared with iced-x86 (AMD decoding) over 3.99 million
encodings: every opcode of the legacy, 0F, 0F38 and 0F3A maps under 34
prefix combinations and the VEX 0F, 0F38 and 0F3A maps, each with 48
ModRM forms. Apart from this, it agrees on length, RIP-relative offset,
control flow kind and branch target for every valid Zen 2 instruction
except near branches with a 66 prefix, recorded as technical debt, and
kernel-only returns, which it treats as sequential.

Add the comparison's metadata as cases: one RIP-relative encoding per
opcode, map and immediate size, every FF /r form, and the branch forms
with their flow kind and target. The existing cases check lengths only;
a loop or jrcxz decoded as an unconditional jump passed the whole suite.
2026-10-14 11:33:59 +02:00
GalaxyGamingFRandClaude Opus 5.5 efde691a45 fix(conventions): accept Depends on answered as a list
The pr-template check only accepted "Depends on: #N" or "none" on the same
line, so a checklist answering it as a bulleted list failed CI although
pr_overlap reads exactly that form (test_pr_overlap_dependencies covers
"Depends on:
- #2
- #3"). Allow one list marker before the first answer;
an empty answer is still reported.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012zyXkUzTZGh3nBwNMtrLaW
2026-10-14 02:32:58 -07:00
Dean 0b97f8b9f5 Merge pull request #3664 from alfalfa-star/feat/linux-wayland
feat(videoout): use native Wayland on Linux
2026-10-14 22:32:26 +13:00
Romans Pokrovskis 943d362d2d style(shader): trim descriptor fixture trailing blank lines 2026-10-14 12:26:01 +03:00
Romans Pokrovskis 252bb1a42a test(shader): distinguish unsupported scalar descriptor bases 2026-10-14 12:26:01 +03:00
Romans Pokrovskis c393e720af test(shader): require exact invalid buffer descriptor refusals 2026-10-14 12:26:01 +03:00
Romans Pokrovskis fdf0390354 test(shader): lead VCC descriptor controls with MTBUF 2026-10-14 12:26:01 +03:00
Romans Pokrovskis 5a71b313c4 test(shader): exercise mixed buffer descriptors on Vulkan 2026-10-14 12:26:01 +03:00
Romans Pokrovskis c8d44e651e feat(shader): decode mixed SGPR and VCC buffer descriptors 2026-10-14 12:26:01 +03:00
Tiberon Kuiper 87e090452d fix(libc): ignore empty macOS write-watch ranges 2026-10-14 11:25:05 +02:00
GalaxyGamingFRandClaude Opus 5.5 84d2bb93e3 fix(ci): label all open PRs, not only the newest 200
The area-labels workflow listed open PRs with -L 200, so with more than 200
open PRs the older ones never entered the todo list and never got their area
labels (#3295 changes libkernel and has no libkernel label). List up to 1000;
the head -n 40 cap still bounds labeler work per run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012zyXkUzTZGh3nBwNMtrLaW
2026-10-14 02:23:19 -07:00
Alexandros Pournaras 5a0d74d1f8 style(libSceCesCs): reorder functions 2026-10-14 12:20:58 +03:00
Dean 43349d4337 Merge pull request #4806 from eljackjoestar-cmd/codex/file-backed-spirv
fix(shader): map retained SPIR-V from shader cache entries
2026-10-14 22:18:29 +13:00
David 69715e8393 docs(debt): record that the guest environment starts empty 2026-10-14 13:15:53 +04:00
David 713a23888c test(libc): keep the host's HOME and PATH out of the guest environment 2026-10-14 13:15:07 +04:00
David 70ef3710f3 fix(libc): start the guest environment empty instead of copying the host's 2026-10-14 13:14:58 +04:00
NaitikJoshiProandClaude Opus 5.5 23b8a3a48a fix(agc): queue 0 waits instead of spinning when every queue is idle
With every queue idle, no completions pending and no storage results
pending, queue 0 took the idle branch, found nothing to store
(idleResultsPending() is false since #4410 added the AnyPending() check)
and re-checked at once: the condition kept for "nothing was stored"
continued the loop whenever storeIdleResults was false. Queue 0 never
reached its wait and spun on the driver mutex, a full host core for as
long as the GPU sat idle.

Queue 0 now re-checks only when storage results became pending since the
check or a queue finished work (idle epoch changed); otherwise it waits
for a submission or the next idle epoch as before.

Test: agc_driver_queue_zero_idle_wait submits a NOP on queue 0 and
requires queue 0 to go dormant with nothing pending.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 14:43:25 +05:30
Alexej Szpevák 739fcd7862 perf(tools): read checker file contents through one git cat-file process
Check read every technical debt file and every changed file with its
own git show, so each run started one process per file: 99 git
processes for a typical pull request, 311 for a 118-file range, and the
count grew with docs/dev/debt. Process start-up dominates on Windows.

Read the blobs the checks use in one git cat-file --batch process,
keyed by the object ids ls-tree already returns, and batch the files
duplicates() inspects the same way. Paths that are not cached still go
through git show, so failures are unchanged.
2026-10-14 11:11:38 +02:00
Alexandros PournarasandClaude Sonnet 5.5 4941c586cd feat(libSceCesCs): declare sceCesRefersUcsProfileCp1250
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-14 12:04:43 +03:00
Kikoarl 206162549f perf(agc): eliminate DCC register clear fallback during color metadata pass 2026-10-14 22:00:47 +13:00
Muhammad Wasif Ali WasifandClaude Opus 5.5 0c06a28ac5 fix(savedata): read every sceSaveDataSetSaveDataMemory2 data entry at its 64-byte stride
SaveDataMemoryData was declared as 24 bytes, so libSceSaveData.native read the second and later entries of a guest data array from the reserved bytes of the first one, saw a zero size and skipped them while returning OK. The entry is 64 bytes (buffer, size, offset, 40 reserved), as SaveDataCore.hpp already asserted for its own copy of the struct and shadPS4 declares.

With the shared type the right size, SaveDataCore.hpp drops its private MemoryData and the casts to it and uses SaveDataMemoryData. Its range check takes the unsigned offset; a negative guest offset is still rejected because it exceeds any memory size.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 14:00:34 +05:00
Dean 66f894761b Merge pull request #5733 from oneandonlydean/test/avplayer-paused-jump-events
test(avplayer): give the paused-jump restart test an event callback
2026-10-14 21:59:10 +13:00
Dean 2dbb729b78 Merge pull request #5738 from oneandonlydean/revert/5608
Revert "fix(libSceVideoOut): export unknown Onimusha import NID" (#5608)
2026-10-14 21:58:37 +13:00
Dean Galvin 759cc67bac test(agc): validate the narrow constant store fixture through its word pointer
Retained SPIR-V is a span now, and SpirvTools::Validate takes a vector or a pointer and a size.
2026-10-14 21:56:47 +13:00
Dean 2582ec1193 Merge pull request #5309 from hugodearaujo/feat/agc-sparse-dmabuf-import
feat(agc): import shared ranges above 64 MiB as sparse buffers over udmabuf chunks
2026-10-14 21:50:50 +13:00
GalaxyGamingFRandClaude Opus 5.5 a30f700630 fix(tools): accept skip reasons on their own line in check_skips
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012zyXkUzTZGh3nBwNMtrLaW
2026-10-14 01:44:11 -07:00
TideOPL b14d844855 perf(libc): remember ranges proven collectable until the mappings change 2026-10-14 09:43:40 +01:00
TideOPL 2af88da01f perf(libc): walk the shared views of a write collect in order 2026-10-14 09:43:40 +01:00