Commit Graph
2561 Commits
Author SHA1 Message Date
Adrià 1036905b5f Merge pull request #5565 from Dripl1x/feat/socket-options-nodelay-nosigpipe-nbio
feat(libkernel): answer TCP_NODELAY, SO_NOSIGPIPE and SO_NBIO on a guest socket
2026-10-15 14:11:15 +02:00
Adrià 264a528877 Merge pull request #5556 from Nixitov/feat/rtprio-thread
feat(libkernel): implement rtprio_thread and the pthread concurrency controls
2026-10-15 14:10:58 +02:00
Adrià 7bb2b1f973 Merge pull request #5598 from JJenkx/fix/guest-declared-host-import-registry
fix(relinker): record declared host imports in guest registries
2026-10-15 13:58:59 +02:00
Adrià 23dcb82499 Merge pull request #5648 from Amoenus/codex/buffer-resource-vcc-tuple
fix(shader): accept buffer resource tuples ending in VCC
2026-10-15 13:55:14 +02:00
Adrià fdea36b836 Merge pull request #5524 from Amoenus/codex/native-depth-allocation-retirement
fix(agc): retire fully released native depth owners
2026-10-15 13:50:13 +02:00
Adrià 38d2454486 Merge pull request #5559 from JJenkx/fix/guest-executable-import-dependencies
fix(relinker): select guest startup dependencies from required roots
2026-10-15 13:38:52 +02:00
Adrià 5050a23f38 Merge pull request #5473 from MarcZX100/type0-recompiler-followup-4779
fix(shader): accept TYPE=0 images during materialization
2026-10-15 13:37:52 +02:00
Adrià 5e7d09aafe Merge pull request #5538 from JJenkx/fix/ngs2-render-capacity
fix(ngs2): limit render writes to the configured grain
2026-10-15 13:29:33 +02:00
Adrià 821c69e504 Merge pull request #5509 from billythemenace2/fix/shader-cube-tsharp-2d-access
fix(shader): read cube T#s through DIM 2D image_sample and image_load as face 0
2026-10-15 13:25:34 +02:00
Adrià 39d3ae13eb Merge pull request #5304 from tv7/fix/stencil-ref-export-unused
fix(agc): drop an unused stencil test value export from draws without a stencil test
2026-10-15 13:24:56 +02:00
Adrià FranchandClaude 91878f51f9 docs(debt): describe the TYPE=0 null image scope as implemented
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-15 13:12:00 +02:00
Adrià Franch 6f0aa97f6c docs(debt): describe the unused stencil export drop next to the stencil replay 2026-10-15 12:51:37 +02:00
NikoandClaude Opus 5.5 c434467f6c fix(agc): form reversed-order blend factors from copies of the export
The reversed-order blend computed the factors Vulkan cannot apply per
channel in the pixel shader (1 - x in fp32, a clamp for UNORM targets
and, when both positions needed it, a premultiplied export) and passed
them to the blend as a dual-source second color. A plain blend converts
the export once and forms 1 - x and the products from that converted
value, so the two paths can round differently. On UNORM8 the difference
reaches one step per substituted factor: an Intel iGPU stored 161 where
the exact blend is 159.75 for SRC_COLOR + ONE_MINUS_SRC_COLOR with an
export of 0.5 over 192 (160 through SWAP_STD), and on an RTX 5080 and
lavapipe the split path differed from the same draw into a SWAP_STD
target by up to 2 steps on other inputs.

The pixel shader now only copies values. Each channel of the second
color is the exported alpha, the channel's own export or the constant 0
or 1, and a channel of the first color whose source factor is ONE may
become 1 with its export moved into the factor. Every factor, 1 - x and
product comes from the blend through SRC1_COLOR, SRC1_ALPHA and their
ONE_MINUS forms, applied to copies of the same export values that the
first color carries. TranslateReversedBlend searches for Vulkan factors
and copy routes that reproduce each channel's guest factors and throws
for combinations no routing reproduces, such as ONE_MINUS_SRC_ALPHA in
the alpha equation next to SRC_COLOR in the color equation: of the 1995
factor combinations the shader used to compute, 932 are routed and the
others throw again, as on main. GT7's 0x65010504 is among the routed
ones. The code is now four 2-bit routes for each color, the same for
every format, and the post-pass emits no arithmetic.

agc_driver_reversed_order_blend also draws each case into a SWAP_STD
target, which Vulkan blends alone, and requires identical stored bits;
the comparison with the exact blend keeps its 1-step tolerance.
agc_driver_graphics checks every factor combination TranslateReversedBlend
accepts against the guest equations and that the post-pass adds no
arithmetic instructions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 12:51:27 +02:00
NikoandClaude Opus 5.5 16ea32c97d feat(agc): blend into color targets with a reversed component order
8_8_8_8 and 16_16_16_16 targets with COMP_SWAP 2 or 3 keep the exported
alpha in their first channel and red or blue in their fourth, so a plain
Vulkan blend would run the alpha equation on a color channel. Such draws
threw "blending into a color target with a reversed component order is
not implemented" (Gran Turismo 7, #4782).

The AMD SI and CIK register references describe CB_TARGET_MASK in the
order of components after blending and before COMP_SWAP is applied, and
RADV programs CB_BLENDn_CONTROL without regard to the swap while it
renders R4G4B4A4, B4G4R4A4, R5G5B5A1 and B5G5R5A1 through SWAP_STD_REV
and SWAP_ALT_REV and passes the CTS blend tests on Navi10. The color
block is therefore taken to blend in export order: the alpha equation
and source-alpha factors use the exported alpha and the destination
alpha is the first channel.

TranslateReversedBlend keeps the factor pairs Vulkan applies per channel
in the pipeline. Other source factors are computed by the pixel shader
from its MRT0 export (clamped for UNORM targets, as BLEND_CLAMP says)
and handed to the blend as a dual-source second color, which the
fragment output post-pass adds at location 0 index 1; when both
positions need it, the export is premultiplied by its source factor.
The code is a pipeline specialization, serialized in request version
26, and stays out of the prepared shader key.

sRGB, SNORM and integer targets, constant and second-source factors,
destination alpha in the color equation, destination factors the two
equations do not share, different color and alpha operations, MIN or
MAX with factors other than ONE, other color exports when the shader
computes factors, and devices without dualSrcBlend still throw, now
with the blend control, mapping and format in the message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 12:51:27 +02:00
Adrià FranchandClaude 03401459f9 perf(agc): pipelined draws and exact draw write ranges on by default
Queue 0 now pipelines draw commits unless APS5_PIPELINED_DRAWS=0, and draw write ranges use the exact
color, DCC, CMASK, depth and stencil sizes unless APS5_EXACT_DRAW_WRITES=0. The base tests now run the
pipeline; agc_driver_pm4_failure_inline and agc_driver_draw_cache_reuse_inline keep the inline path
covered.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-15 12:13:26 +02:00
Romans Pokrovskis da9fe3c708 fix(agc): retire fully released native depth owners
Track successful releases cumulatively across the complete depth and HTILE ownership ranges. Preserve color retirement and share its single callback; keep retired image contents alive through sampled views and recorded work. Add registry, partial/failure/protection, remap and mixed teardown regressions. Depends on native depth sampling in PR5496 and its descriptor prerequisite PR4820.
2026-10-15 13:08:13 +03:00
Adrià FranchandClaude 4051ee19c5 docs(architecture): describe the queue-0 draw pipeline
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-15 11:34:29 +02:00
SP4C3B4R-8andClaude Opus 5.5 626cff7d26 fix(libSceAgcDriver): retire a depth surface once another writer covers its memory
A depth surface lives only in its Vulkan image, so a view of its memory
with another layout could only throw, and a matching view kept reading
the image after other writes over its memory. Retire the surface when a
color target or a written storage image it does not serve overlaps its
planes, or when a view it cannot serve finds guest memory over the planes
written since the surface was last bound; lookups then skip it and the
view reads the memory like any texture. Binding the target again brings
the surface back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 11:00:36 +02:00
Adrià 0afa6a607e Merge pull request #6060 from parl0v/feat/watched-private-imports
perf(agc): keep Windows host imports of write-watched private memory watched
2026-10-15 10:54:43 +02:00
Adrià c4f03522a7 Merge pull request #5496 from Amoenus/codex/native-msaa-depth
feat(agc): sample native multisampled depth attachments
2026-10-15 10:54:18 +02:00
Adrià db81992c55 Merge pull request #5238 from MarcZX100/fix/trace-draw-program-addresses-5166
feat(agc): trace shader addresses for each draw
2026-10-15 10:06:31 +02:00
Adrià FranchandClaude 290be56265 test(agc): skip the dma-buf import probe when /dev/udmabuf can't be opened
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-15 10:05:09 +02:00
Adrià FranchandClaude 23fccd7632 fix(agc): settle only imports of 1 MiB or more
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-15 09:58:21 +02:00
Josip Parlov 295b1c55f4 fix(agc): drop the import-watch environment switches
The second queue that settles imports is always created on Windows, and a device without one keeps
the comparisons. The other-family settle path is tested through the recorder test device built
with its settle queue on another family (agc_import_watch_other_family) instead of
APS5_SETTLE_OTHER_FAMILY.
2026-10-15 09:46:48 +02:00
Josip Parlov 42178b494d test(agc): a store from another thread within an import window
The settle read keeps a private import's window open for one round trip on the settle queue, so a
store from another thread can land inside it. CheckImportWindowOtherThread: a store of new bytes from
another thread within the window counts as written, and a same-value one keeps its possible CPU
touch. The debt entry notes the longer window.
2026-10-15 09:46:48 +02:00
Adrià FranchandClaude 1ff6ca7a67 docs(architecture): describe settled watched imports of private memory on Windows
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-15 09:46:48 +02:00
Josip Parlov 9ba58c2a60 perf(agc): keep Windows host imports of write-watched private memory watched
On Windows a host import without a section alias left guest write tracking, and its changes were
found by comparison. Since resident direct memory became private MEM_WRITE_WATCH memory, its
imports take that path, and every storage-texture refresh over it compares its whole snapshot.

ProbeImportWriteProtection gets a Windows body on MEM_WRITE_WATCH scratch memory, and
decideImportWatch keeps direct imports of private read-write memory watched when GetWriteWatch
stays honest after an import's first GPU use. The driver marks every imported page written until
that use completes, so each such import is settled inside ImportWatched's window by a 4-byte read on
a second queue of the graphics family (the imports lock comes after GpuMutex, so the main queue
cannot be used there). APS5_NO_WATCHED_PRIVATE_IMPORTS=1 keeps the comparisons.
2026-10-15 09:46:48 +02:00
JJenkx d94000a096 fix(relinker): load guest providers used by executable imports 2026-10-15 01:40:33 -04:00
Dean a077a88df5 Merge pull request #5139 from Kikoarl/feat/ngs2-custom-module-user-fx
feat(ngs2): support custom submixer rack UserFx module 0x1d
2026-10-15 15:34:22 +13:00
fdfawef324 1ffc5f672b feat(agc): emulate per-pixel multisample coverage masks
Decode the four PA_SC_AA_MASK fields at the rasterized sample count. Use the native Vulkan mask when all four pixels agree and apply varying masks in the fragment shader, preserving helpers and combining coverage with alpha-to-coverage and shader mask exports. Add the normalized masks to pipeline, draw and shader keys and the versioned replay request.

Refuse unsupported conservative-raster, centroid and early depth/stencil memory-write cases. Synthetic readbacks cover driver submission, depth/stencil suppression, fragment stores and one-sample and four-sample coverage.
2026-10-15 13:00:34 +13:00
Dean ab9a476840 Merge pull request #5583 from BlizzyInc/fix/sample-through-1d
fix(shader): read explicit-LOD 2D samples through 1D T#s as measured
2026-10-15 12:34:15 +13:00
Dean 4bdfc9c801 Merge pull request #5631 from moong15/codex/skip-unused-pixel-stage
fix(agc): skip unused pixel stages with retained export formats
2026-10-15 12:33:48 +13:00
Adrià 2559e96233 Merge pull request #5531 from KauaSantos702/fix/name-psml-savedata-nids
fix(psml): name two exports that only had NIDs
2026-10-15 01:17:00 +02:00
Romans Pokrovskis f56e3bc467 fix(agc): refuse native multisampled depth attachment feedback
Reject native sampled views of the depth image attached by the same draw before pipeline creation. Keep unrelated views, other devices and the single-sample path unaffected. Add unrun native-view refusal and scope controls; full dependency-stack build and runtime validation remain pending.
2026-10-15 02:15:38 +03:00
Romans Pokrovskis ee1ba73a2f feat(agc): sample native multisampled depth attachments
Adapt our preserved native-depth sampling work from c0d9edf and sample-aware footprint work from 6e35a877, retaining creation-time coherence and initial HTILE proof. The descriptor interface in upstream PR 4820 remains a separate prerequisite. This source draft has not been built or run.
2026-10-15 02:15:37 +03:00
Dean e263fc4c87 Merge pull request #6033 from milescoviello/carry/playgo-optional-chunks
fix(libScePlayGo): report optional chunks as supported and installed
2026-10-15 12:15:31 +13:00
Dean 28fb252c62 Merge pull request #4341 from MarcZX100/codex/accept-vertex-stage-2002008-4329
fix(agc): accept reported vertex stage state
2026-10-15 12:14:32 +13:00
umang 843f7e963e fix(agc): skip unused pixel stages with retained export formats 2026-10-15 11:35:54 +13:00
Cesar RodriguezandClaude Opus 5.5 c43af1f372 fix(libScePlayGo): report optional chunks as supported and installed
A dump is fully installed, so scePlayGoGetSupportedOptionalChunk and
scePlayGoGetOptionalChunk report every optional chunk (language pack) like
scePlayGoGetLanguageMask reports every language. They returned an empty
bitmask, so PPSA01748 hid every text language its playgo-scenario.json
lists as a chunk language, English included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:30:55 +00:00
Adrià ba3ffbab9d Merge pull request #5523 from milescoviello/fix/pad-vibration-mode-5
fix(pad): accept vibration mode 5
2026-10-15 00:28:36 +02:00
Adrià ddba90e4ae Merge pull request #5494 from MarcZX100/fix/playgo-assume-unlisted-incomplete-dump
fix(libScePlayGo): report missing chunk metadata
2026-10-15 00:27:52 +02:00
Adrià 462eb4d9f1 Merge pull request #5493 from Roojool/contrib/g14-kqueue-watch
fix(libkernel): name the failing vnode watch in the kqueue notification error
2026-10-15 00:27:23 +02:00
Adrià 922abe6a4e Merge pull request #5892 from WallisSkill/fix/cat-quest-3-ppsa15065
perf(agc): compare sampled snapshots outside the write watch only after a write-watch mark
2026-10-15 00:05:10 +02:00
Adrià 596a0d70aa Merge pull request #5472 from eljackjoestar-cmd/codex/rgba8-uint-force-degamma
fix(shader): decode forced degamma on biased RGBA8_UINT samples
2026-10-15 00:01:33 +02:00
Dean 8ae436891a Merge pull request #5181 from ThatsLeo/perf/shader-compact-resource-plans
perf(shader): keep only evaluable branch conditions in resource plans
2026-10-15 10:56:57 +13:00
Adrià 6870cc26ba Merge pull request #5492 from billythemenace2/fix/shader-lds-add-f32-denormals
fix(shader): flush ds_add_f32 denormals and NaNs as the hardware does
2026-10-14 23:53:34 +02:00
Adrià 038c83b9ba Merge pull request #5446 from Nesyth/fix/agc-depth-surface-from-storage-writes
fix(agc): start a new depth surface from the storage writes over its plane
2026-10-14 23:51:42 +02:00
KauaandClaude 6f5f176aa6 fix(psml): name two exports that only had NIDs
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-14 23:48:29 +02:00
Dean 9bec202332 Merge pull request #5517 from ps54all/feat/libsceajm-opus-family255-multistream
feat(ajm): decode Opus mapping family 255 with several channels
2026-10-15 10:48:06 +13:00
Adrià FranchandClaude de0cd00eb1 docs(build): document APS5_TRACE_DRAW_PROGRAMS
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-14 23:39:27 +02:00