Commit Graph
2834 Commits
Author SHA1 Message Date
fdfawef324andCodex 97a0a4d098 refactor(agc): separate stencil replay from its follow-up topics
Move bounded vertex folding and empty-image feedback into separate topics. Keep the replay coverage proof, stage contracts, finite-reference tests and mapped cache regressions; version the stencil layout separately as format 34.

Co-Authored-By: Codex <noreply@openai.com>
2026-10-14 22:08:48 +02:00
fdfawef324andCodex 77521f7ad2 feat(agc): replay proven finite stencil reference exports
Preserve instance and triangle order with one dynamic-reference shader pipeline. Require bounded references, complete export coverage, replay-safe mask control and resources; refuse unsupported side effects and feedback.

Co-Authored-By: Codex <noreply@openai.com>
2026-10-14 22:08:35 +02:00
billythemenace2andClaude Opus 5.5 c63281824f fix(agc): rasterize a multisampled target without MSAA_ENABLE at the pixel center
A draw with PA_SC_AA_CONFIG.MSAA_NUM_SAMPLES > 0 and
PA_SC_MODE_CNTL_0.MSAA_ENABLE clear threw. On GFX10 and later the bit
is what makes the rasterizer use the programmed sample locations; with
it clear the draw now keeps the target's sample count with every sample
at the pixel center. Points, lines, a depth target and
alpha-to-coverage still throw.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 21:00:53 +01:00
Adrià FranchandClaude ade067251c docs(debt): move the single-level volume bias line off the end of the section
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-14 21:58:28 +02:00
eljackjoestar-cmd 89777fcaa1 fix(shader): sample single-level volumes through biased 2D accesses 2026-10-14 21:58:18 +02:00
billythemenace2andClaude Opus 5.5 0851c08b60 fix(shader): compare through 2D image_sample_c on 1D T#s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 21:54:00 +02:00
MarcZX100 825a26751c fix(shader): accept TYPE=0 images on current main 2026-10-14 19:53:00 +00:00
simonbronkandClaude Opus 5.5 ce074f9302 docs(debt): note the protection bits sceKernelMprotect drops
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:51:57 +02:00
Adrià FranchandClaude f093cf4975 docs(debt): record sampling a multisampled texture no draw rendered to
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-14 21:42:20 +02:00
David-cmrg 2dd7f2b0e3 fix(libSceSystemService): end LoadExec exit without running guest exit handlers 2026-10-14 21:41:22 +02:00
Adrià 31d951edea Merge pull request #5375 from billythemenace2/fix/shader-3d-access-on-1d-tsharp
fix(shader): read 1D T#s through 3D image_sample and image_load accesses
2026-10-14 21:40:54 +02:00
Adrià 4b11b97ebb Merge pull request #5096 from sguckiran/main
fix(libkernel): convert local time with the host time zone
2026-10-14 21:38:24 +02:00
XairRrR 8dbf06798c fix(shader): honour SPI_BARYC_CNTL.FRONT_FACE_ALL_BITS for the front-face input
The front-face VGPR was always +1.0 / -1.0, which is its form only while
FRONT_FACE_ALL_BITS is clear (current Mesa reads it with fgt 0 / fsign).
With the bit set, as Mesa 22.0 RADV programs it, a back face reads 0 and
a front face non-zero: ACO then tests it with v_cmp_lg_u32 0. Uncharted:
Legacy of Thieves Collection (PPSA05684) sets the bit and its two-sided
cloth shaders test v_cmp_lt_u32 0, so -1.0 (0xbf800000) made every back
face a front face: the insides of the menu skeleton's rags kept their
front normals and were lit white by the spot light behind them.

The pixel stage info now carries the bit (request version 26, cache and
draw keys), the decode reads SPI_BARYC_CNTL when FRONT_FACE is an active
input, and the translator turns the builtin into 0xffffffff / 0. The
exact front value is not measured (docs/dev/debt/shader.md).

AI-assisted: yes
2026-10-14 21:37:48 +02:00
Adrià 358e218a4c Merge pull request #5083 from Dripl1x/codex/secondary-loadexec
fix(libSceSystemService): pass LoadExec arguments as the whole guest argv
2026-10-14 21:37:44 +02:00
Adrià b6406a1715 Merge pull request #5792 from SaloQT/feat/prebuilt-shader-packs
feat(recompiler): load prebuilt shader packs before the writable cache
2026-10-14 21:26:42 +02:00
Nahid DelicandClaude Opus 5.5 3a7e82a178 fix(shader): address ordered counts by offset0 alone
On ds_ordered_count M0 holds the ordered wave ID, not a GDS address as
for ds_append: radeonsi and ACO pass the wave ID as the intrinsic's
pointer and keep the counter address in offset0. Reading M0 as the base
and size skipped the add whenever M0[15:0] was 0, so every wave got the
same range. The test now runs the ordered pass with M0 = 0 and M0 = 7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:23:52 +02:00
Nahid DelicandClaude Opus 5.5 46a1cc0fc3 feat(shader): add GDS ordered counts and ordered-append dispatches
ds_ordered_count adds the first active lane's value to a GDS counter and
returns the previous value, like ds_append adds the lane count. Waves are
not serialized in launch order: each still gets its own range. Ordered
swap and multi-dword counts stay refused. DISPATCH_DIRECT and
DISPATCH_INDIRECT accept ORDERED_APPEND_ENBL (bit 3) of the initiator.
Compute shaders of MXGP 26 (PPSA30839) use both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:23:52 +02:00
ThatsLeo 26f0331094 perf(shader): keep only evaluable branch conditions in resource plans
A plan copied every control-flow condition with all its operands, though one
that depends on a vector register is never evaluated. Such conditions are
dropped, and the copied values live in one arena without use lists.
2026-10-15 08:22:09 +13:00
Dean b1d07f8b12 Merge pull request #3607 from itsbo5/feat/libSceNpCommerce-dialog-open2
feat(libSceNpCommerce): implement sceNpCommerceDialogOpen2
2026-10-15 08:19:19 +13:00
Evgeniy KazarinandClaude Opus 5.5 17ded56f12 feat(libkernel): apply SO_RCVTIMEO and SO_SNDTIMEO on a guest socket
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:18:23 +03:00
Evgeniy KazarinandClaude Opus 5.5 7e79f36ed8 feat(libkernel): answer TCP_NODELAY, SO_NOSIGPIPE and SO_NBIO on a guest socket
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:17:26 +03:00
codingreapermapsandClaude Opus 5.5 f8e8aca5c1 fix(agc): accept fractional-even tessellation partitioning
VGT_TF_PARAM.PARTITIONING 3 now compiles to Vulkan's fractional-even
spacing, which radeonsi programs as PART_FRAC_EVEN. Its factors are
bounded at 64 like integer partitioning; Vulkan raises the remaining
ones to at least 2, the D3D11 range for this mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:16:21 +02:00
Dean 4c1de0c0ca Merge pull request #4706 from TripyFox/fix/3274-indirect-calls
feat(shader): link callees of calls whose target is loaded from a table
2026-10-15 08:15:26 +13:00
Adrià a050f856f1 Merge pull request #5233 from hugodearaujo/fix/user-service-lifecycle
fix(libSceUserService): report initialization the way the console does
2026-10-14 21:07:55 +02:00
Adrià b0a4753de1 Merge pull request #5230 from hugodearaujo/fix/inherit-creator-priority
fix(libkernel): give an inheriting thread its creator's priority
2026-10-14 21:07:30 +02:00
Adrià 9811e9d4b7 Merge pull request #5218 from YossiYad/fix/guest-arena-mapping-hint
fix(libkernel): fall back below a mapping hint with no room above it
2026-10-14 21:05:23 +02:00
Adrià 066442c961 Merge pull request #5143 from xXPBSXx/fix/mprotect-unmapped-einval-v2
fix(libkernel): fail sceKernelMprotect over an unmapped range with EINVAL instead of aborting
2026-10-14 21:05:05 +02:00
Adrià c70051255c Merge pull request #5077 from 0xRickx/fix/libscevideodec2-coded-size
fix(libSceVideodec2): report the coded picture size
2026-10-14 21:03:52 +02:00
Adrià 5922a728c6 Merge pull request #5020 from xXPBSXx/fix/socket-fd-flags
fix(libkernel): answer F_GETFD and F_SETFD on a guest socket
2026-10-14 21:03:19 +02:00
Adrià 16d7ad035c Merge pull request #4933 from nicolasfalesy/fix/libkernel-poll-scenet-sockets
fix(libkernel): poll libSceNet sockets with the host wait
2026-10-14 21:02:57 +02:00
Dean 3bb8b6c198 Merge pull request #5760 from oneandonlydean/fix/storage-gpu-store-saved-bytes
fix(agc): save the bytes a GPU-side store writes outside the write watch
2026-10-15 07:58:34 +13:00
XairRrR 9206b5ae4b fix(libSceFiber): run a fiber on its own context when the context is large
Since 794714983 every fiber ran on an mmap'd host stack so that host calls
cannot overrun the small contexts PPSA01341 packs next to each other. A
title that derives state from the stack pointer then reads the wrong
memory: PPSA05684's job fibers have 512 KiB contexts at 1 MiB-aligned
addresses and find their job record by masking rsp with ~0xfffff, so the
job system lost track of a GameInit job and the game waited forever
right after loading big4r/actor76.txt. Its 64 KiB fibers fault later on
a host stack too.

A fiber now gets a host stack only when its context is smaller than
64 KiB; a larger context is the stack again, as on the console. The
limit sits between the 16 KiB contexts that need protection and the
64 KiB ones that need the guest stack (technical debt entry). The fiber
test runs a 512 KiB fiber and checks that its stack is in its context;
it fails without this change.

AI-assisted: yes
2026-10-14 20:47:25 +02:00
KernelPanicNTandClaude Opus 5.5 7d42db40a3 feat(libSceAppContent): implement sceAppContentGetAddcontDownloadProgress
The signature (uint32_t service label, const NpUnifiedEntitlementLabel*,
progress*) follows SharpProspero Interop/AppContent/AppContent.cs.
dlc_emu dlc_content.cpp (fcf69b16) answers PARAMETER for a null label or
progress and NOT_FOUND for a label that is not installed additional
content. No additional content is ever installed here, as
sceAppContentAddcontMount, sceAppContentAddcontEnqueueDownload and
sceAppContentAddcontDelete already model, so every other call answers
NOT_FOUND and the progress, whose 16-byte layout SharpProspero gives,
is never written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:44:42 +00:00
KernelPanicNTandClaude Opus 5.5 cf762829d1 feat(libSceFont): implement sceFontCharactersRefersTextCodes and text code stepping
sceFontCharactersRefersTextCodes fills a 64-byte FontTextCodes with the
order and code of a text character and keeps the current, start and
term characters at +0x28, +0x30 and +0x38. The traversal follows the
PS4 11.00 libSceFont.sprx disassembly posted in the review of #4050,
which implemented the same rules: Refers never compares the character
with the term and returns null for a clustered or synthetic character,
sceFontTextCodesStepNext returns null at the term after visiting it,
sceFontTextCodesStepBack returns null at the start character, and both
steps skip synthetic characters. Null from StepNext at the end of the
chain and from StepBack at the head of the chain is assumed and not
covered by the report.

The signatures follow Orbital's IDA type database and SharpProspero. A
null cursor or output returns null as in KytyPS5; a null text character
throws. guest_font_tests gets configure_windows_unwind so the expected
exception reaches the test on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:44:41 +00:00
SaloQT 93ab137194 test(recompiler): cover prebuilt shader pack loading
Build packs from EncodeEntry output and check the hit and miss paths,
an entry stored under another key, a truncated entry, a damaged index,
an out-of-range record, a foreign compiler source version and an
unknown format. A child process covers pack discovery on a real disk
load, the ANYPS5_NO_PREBUILT_SHADERS opt out and fall-through to the
writable cache. ARCHITECTURE.md describes where the prebuilt lookup
sits.
2026-10-15 05:44:34 +11:00
Adrià e27ff7c545 Merge pull request #5819 from GitamarT045T3R/fix/windows-lstat-symbolic-links
feat(libkernel): report relative symbolic links in lstat on Windows
2026-10-14 20:44:09 +02:00
zmeizyandClaude Opus 5.5 f11382faf4 fix(shader): translate v_ldexp_f32 in f32 denormal modes 1 and 2
Mode 1 keeps subnormal inputs and flushes a result below 2^-126 to a
zero of its sign; mode 2 flushes subnormal inputs and rounds a subnormal
result in the f32 round mode, as measured on RDNA2 (gfx1030) in every
f32 round mode at IEEE=0 and IEEE=1. Both modes threw before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:39:55 +03:00
zmeizyandClaude Opus 5.5 659eddb107 fix(shader): translate f32 compares in f32 denormal modes 1 and 2
v_cmp_X_f32 and v_cmpx_X_f32 flush their denormal inputs by bit 0 of the
FLOAT_MODE f32 denormal field, as measured on RDNA2 (gfx1030): mode 1
keeps them and mode 2 flushes them. Both modes threw before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:39:54 +03:00
NikoandClaude Opus 5.5 68bddf8083 fix(libSceNpCommerce): open sceNpCommerceDialogOpen2 as prosper does
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:39:34 +13:00
virp-mta 2b4cb387aa feat(libSceNpCommerce): implement sceNpCommerceDialogOpen2 2026-10-15 07:39:34 +13:00
Dean bebff8b0e8 Merge pull request #3295 from SynnZer0/fix/libkernel-close-host-streams
fix(libkernel): keep host standard streams open on guest close
2026-10-15 07:38:36 +13:00
Dean 43ea7688cf Merge pull request #5511 from JJenkx/perf/spirv-bounded-redundancy
perf(shader): avoid redundancy traversal map copies
2026-10-15 07:38:13 +13:00
Adrià 456ce66bb0 Merge pull request #5163 from mazen320/fix/agc-init-fallback-out-of-range
fix(agc): return 0 for out-of-range sceAgcInit without table lookup
2026-10-14 20:35:43 +02:00
Adrià 3433555888 Merge pull request #5072 from 0xRickx/fix/libscejpegdec-reference-abi
fix(libSceJpegDec): use the JpegDec parameter and image info layouts
2026-10-14 20:33:18 +02:00
Adrià 9f373a46a9 Merge pull request #5056 from 0xRickx/fix/libscenetctl-get-info
fix(libSceNetCtl): answer sceNetCtlGetInfo from the host IPv4 interface
2026-10-14 20:32:46 +02:00
Adrià cb893e0ff3 Merge pull request #5007 from gravelas/fix/agc-await-registration-preparation-at-submit
fix(agc): wait for queued registration preparations before accepting a submission
2026-10-14 20:31:56 +02:00
Adrià c5f6269796 Merge pull request #4767 from Swastik-51/fix/agc-fmask-decompress-msaa
fix(agc): handle FMASK decompress on MSAA targets
2026-10-14 20:31:07 +02:00
Nesyth 7d898ae1ab fix(agc): start a new depth surface from the storage writes over its plane 2026-10-14 20:23:39 +02:00
Adrià 706ad6c20c Merge pull request #5198 from eljackjoestar-cmd/codex/audioout2-advance-grains
fix(audio): preserve completed AudioOut2 grains across threads
2026-10-14 20:22:51 +02:00
Dean Galvin 69702ef105 fix(agc): save the bytes a GPU-side store writes outside the write watch
A write-back stored on the GPU over memory outside the write watch left its
units without saved guest bytes (only the CPU path saved them), so the next
store of results landing there threw (#5711), and every refresh re-uploaded
the image. The stored ranges are now copied from the retile scratch into a
host-visible buffer behind the store and become the saved bytes when the
batch completes; a store or refresh that needs them first syncs that batch.
Units without a write generation pending when their range leaves the watch
save their bytes there too.

The second-store fixture waits for the GPU before its surface is freed on
every return, as #5790 does for the other cases.
2026-10-15 07:03:17 +13:00